Java Doc for PreferencePage.java in  » IDE-Eclipse » jface » org » eclipse » jface » preference » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jface » org.eclipse.jface.preference 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.dialogs.DialogPage
      org.eclipse.jface.preference.PreferencePage

All known Subclasses:   org.eclipse.jface.preference.FieldEditorPreferencePage,
PreferencePage
abstract public class PreferencePage extends DialogPage implements IPreferencePage(Code)
Abstract base implementation for all preference page implementations.

Subclasses must implement the createControl framework method to supply the page's main control.

Subclasses should extend the doComputeSize framework method to compute the size of the page's control.

Subclasses may override the performOk, performApply, performDefaults, performCancel, and performHelp framework methods to react to the standard button events.

Subclasses may call the noDefaultAndApplyButton framework method before the page's control has been created to suppress the standard Apply and Defaults buttons.




Constructor Summary
protected  PreferencePage()
     Creates a new preference page with an empty title and no image.
protected  PreferencePage(String title)
     Creates a new preference page with the given title and no image.
protected  PreferencePage(String title, ImageDescriptor image)
     Creates a new abstract preference page with the given title and image.

Method Summary
public  voidapplyData(Object data)
     Apply the data to the receiver.
protected  voidapplyDialogFont(Composite composite)
     Apply the dialog font to the composite and it's children if it is set.
public  PointcomputeSize()
     Computes the size for this page's UI control.
protected  voidcontributeButtons(Composite parent)
     Contributes additional buttons to the given composite.

The default implementation of this framework hook method does nothing.

abstract protected  ControlcreateContents(Composite parent)
     Creates and returns the SWT control for the customized body of this preference page under the given parent composite.

This framework method must be implemented by concrete subclasses.

public  voidcreateControl(Composite parent)
     The PreferencePage implementation of this IDialogPage method creates a description label and button bar for the page.
protected  LabelcreateDescriptionLabel(Composite parent)
     Creates and returns an SWT label under the given composite.
protected  CompositecreateNoteComposite(Font font, Composite composite, String title, String message)
     Creates a composite with a highlighted Note entry and a message text.
protected  PointdoComputeSize()
     Computes the size needed by this page's UI control.
protected  IPreferenceStoredoGetPreferenceStore()
     Returns the preference store of this preference page.

This is a framework hook method for subclasses to return a page-specific preference store.

protected  ButtongetApplyButton()
     Returns the Apply button.
public  IPreferencePageContainergetContainer()
     Returns the container of this page.
protected  ButtongetDefaultsButton()
     Returns the Restore Defaults button.
public  IPreferenceStoregetPreferenceStore()
     Returns the preference store of this preference page.
public  booleanisValid()
     The preference page implementation of an IPreferencePage method returns whether this preference page is valid.
protected  voidnoDefaultAndApplyButton()
     Suppresses creation of the standard Default and Apply buttons for this page.
public  booleanokToLeave()
     The PreferencePage implementation of this IPreferencePage method returns true if the page is valid.
protected  voidperformApply()
     Performs special processing when this page's Apply button has been pressed.
public  booleanperformCancel()
     The preference page implementation of an IPreferencePage method performs special processing when this page's Cancel button has been pressed.

This is a framework hook method for subclasses to do special things when the Cancel button has been pressed.

protected  voidperformDefaults()
     Performs special processing when this page's Defaults button has been pressed.
public  voidperformHelp()
    
public  booleanperformOk()
    
public  voidsetContainer(IPreferencePageContainer container)
    
public  voidsetErrorMessage(String newMessage)
    
public  voidsetMessage(String newMessage, int newType)
    
public  voidsetPreferenceStore(IPreferenceStore store)
     Sets the preference store for this preference page.
public  voidsetSize(Point uiSize)
    
public  voidsetTitle(String title)
     The PreferencePage implementation of this IDialogPage method extends the DialogPage implementation to update the preference page container title.
public  voidsetValid(boolean b)
     Sets whether this page is valid.
public  StringtoString()
    
protected  voidupdateApplyButton()
     Updates the enabled state of the Apply button to reflect whether this page is valid.


Constructor Detail
PreferencePage
protected PreferencePage()(Code)
Creates a new preference page with an empty title and no image.



PreferencePage
protected PreferencePage(String title)(Code)
Creates a new preference page with the given title and no image.
Parameters:
  title - the title of this preference page



PreferencePage
protected PreferencePage(String title, ImageDescriptor image)(Code)
Creates a new abstract preference page with the given title and image.
Parameters:
  title - the title of this preference page
Parameters:
  image - the image for this preference page,or null if none




Method Detail
applyData
public void applyData(Object data)(Code)
Apply the data to the receiver. By default do nothing.
Parameters:
  data -
since:
   3.1



applyDialogFont
protected void applyDialogFont(Composite composite)(Code)
Apply the dialog font to the composite and it's children if it is set. Subclasses may override if they wish to set the font themselves.
Parameters:
  composite -



computeSize
public Point computeSize()(Code)
Computes the size for this page's UI control.

The default implementation of this IPreferencePage method returns the size set by setSize; if no size has been set, but the page has a UI control, the framework method doComputeSize is called to compute the size.

the size of the preference page encoded asnew Point(width,height), or (0,0) if the page doesn't currently have any UI component



contributeButtons
protected void contributeButtons(Composite parent)(Code)
Contributes additional buttons to the given composite.

The default implementation of this framework hook method does nothing. Subclasses should override this method to contribute buttons to this page's button bar. For each button a subclass contributes, it must also increase the parent's grid layout number of columns by one; that is,

 ((GridLayout) parent.getLayout()).numColumns++);
 


Parameters:
  parent - the button bar



createContents
abstract protected Control createContents(Composite parent)(Code)
Creates and returns the SWT control for the customized body of this preference page under the given parent composite.

This framework method must be implemented by concrete subclasses. Any subclass returning a Composite object whose Layout has default margins (for example, a GridLayout) are expected to set the margins of this Layout to 0 pixels.


Parameters:
  parent - the parent composite the new control



createControl
public void createControl(Composite parent)(Code)
The PreferencePage implementation of this IDialogPage method creates a description label and button bar for the page. It calls createContents to create the custom contents of the page.

If a subclass that overrides this method creates a Composite that has a layout with default margins (for example, a GridLayout) it is expected to set the margins of this Layout to 0 pixels.
See Also:   IDialogPage.createControl(Composite)




createDescriptionLabel
protected Label createDescriptionLabel(Composite parent)(Code)
Creates and returns an SWT label under the given composite.
Parameters:
  parent - the parent composite the new label



createNoteComposite
protected Composite createNoteComposite(Font font, Composite composite, String title, String message)(Code)
Creates a composite with a highlighted Note entry and a message text. This is designed to take up the full width of the page.
Parameters:
  font - the font to use
Parameters:
  composite - the parent composite
Parameters:
  title - the title of the note
Parameters:
  message - the message for the note the composite for the note



doComputeSize
protected Point doComputeSize()(Code)
Computes the size needed by this page's UI control.

All pages should override this method and set the appropriate sizes of their widgets, and then call super.doComputeSize.

the size of the preference page encoded asnew Point(width,height)



doGetPreferenceStore
protected IPreferenceStore doGetPreferenceStore()(Code)
Returns the preference store of this preference page.

This is a framework hook method for subclasses to return a page-specific preference store. The default implementation returns null.

the preference store, or null if none



getApplyButton
protected Button getApplyButton()(Code)
Returns the Apply button. the Apply button



getContainer
public IPreferencePageContainer getContainer()(Code)
Returns the container of this page. the preference page container, or null if thispage has yet to be added to a container



getDefaultsButton
protected Button getDefaultsButton()(Code)
Returns the Restore Defaults button. the Restore Defaults button



getPreferenceStore
public IPreferenceStore getPreferenceStore()(Code)
Returns the preference store of this preference page. the preference store , or null if none



isValid
public boolean isValid()(Code)
The preference page implementation of an IPreferencePage method returns whether this preference page is valid. Preference pages are considered valid by default; call setValid(false) to make a page invalid.
See Also:   IPreferencePage.isValid



noDefaultAndApplyButton
protected void noDefaultAndApplyButton()(Code)
Suppresses creation of the standard Default and Apply buttons for this page.

Subclasses wishing a preference page without these buttons should call this framework method before the page's control has been created.




okToLeave
public boolean okToLeave()(Code)
The PreferencePage implementation of this IPreferencePage method returns true if the page is valid.
See Also:   IPreferencePage.okToLeave



performApply
protected void performApply()(Code)
Performs special processing when this page's Apply button has been pressed.

This is a framework hook method for sublcasses to do special things when the Apply button has been pressed. The default implementation of this framework method simply calls performOk to simulate the pressing of the page's OK button.


See Also:   PreferencePage.performOk



performCancel
public boolean performCancel()(Code)
The preference page implementation of an IPreferencePage method performs special processing when this page's Cancel button has been pressed.

This is a framework hook method for subclasses to do special things when the Cancel button has been pressed. The default implementation of this framework method does nothing and returns true.
See Also:   IPreferencePage.performCancel




performDefaults
protected void performDefaults()(Code)
Performs special processing when this page's Defaults button has been pressed.

This is a framework hook method for subclasses to do special things when the Defaults button has been pressed. Subclasses may override, but should call super.performDefaults.




performHelp
public void performHelp()(Code)



performOk
public boolean performOk()(Code)



setContainer
public void setContainer(IPreferencePageContainer container)(Code)



setErrorMessage
public void setErrorMessage(String newMessage)(Code)



setMessage
public void setMessage(String newMessage, int newType)(Code)



setPreferenceStore
public void setPreferenceStore(IPreferenceStore store)(Code)
Sets the preference store for this preference page.

If preferenceStore is set to null, getPreferenceStore will invoke doGetPreferenceStore the next time it is called.


Parameters:
  store - the preference store, or null
See Also:   PreferencePage.getPreferenceStore



setSize
public void setSize(Point uiSize)(Code)



setTitle
public void setTitle(String title)(Code)
The PreferencePage implementation of this IDialogPage method extends the DialogPage implementation to update the preference page container title. Subclasses may extend.
See Also:   IDialogPage.setTitle(String)



setValid
public void setValid(boolean b)(Code)
Sets whether this page is valid. The enable state of the container buttons and the apply button is updated when a page's valid state changes.


Parameters:
  b - the new valid state




toString
public String toString()(Code)



updateApplyButton
protected void updateApplyButton()(Code)
Updates the enabled state of the Apply button to reflect whether this page is valid.



Methods inherited from org.eclipse.jface.dialogs.DialogPage
protected int convertHeightInCharsToPixels(int chars)(Code)(Java Doc)
protected int convertHorizontalDLUsToPixels(int dlus)(Code)(Java Doc)
protected int convertVerticalDLUsToPixels(int dlus)(Code)(Java Doc)
protected int convertWidthInCharsToPixels(int chars)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
public Control getControl()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
protected String getDialogFontName()(Code)(Java Doc)
public String getErrorMessage()(Code)(Java Doc)
protected Font getFont()(Code)(Java Doc)
public Image getImage()(Code)(Java Doc)
public String getMessage()(Code)(Java Doc)
public int getMessageType()(Code)(Java Doc)
public Shell getShell()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
final protected String getToolTipText(int widgetId)(Code)(Java Doc)
protected void initializeDialogUnits(Control testControl)(Code)(Java Doc)
protected boolean isControlCreated()(Code)(Java Doc)
public void performHelp()(Code)(Java Doc)
protected GridData setButtonLayoutData(Button button)(Code)(Java Doc)
protected void setControl(Control newControl)(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setErrorMessage(String newMessage)(Code)(Java Doc)
public void setImageDescriptor(ImageDescriptor desc)(Code)(Java Doc)
public void setMessage(String newMessage)(Code)(Java Doc)
public void setMessage(String newMessage, int newType)(Code)(Java Doc)
public void setTitle(String title)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.