Java Doc for PreferenceDialog.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) 


org.eclipse.jface.dialogs.TrayDialog
   org.eclipse.jface.preference.PreferenceDialog

PreferenceDialog
public class PreferenceDialog extends TrayDialog implements IPreferencePageContainer,IPageChangeProvider(Code)
A preference dialog is a hierarchical presentation of preference pages. Each page is represented by a node in the tree shown on the left hand side of the dialog; when a node is selected, the corresponding page is shown on the right hand side.


Field Summary
final protected static  intFAILED
    
final public static  StringPREF_DLG_IMG_TITLE_ERROR
    
final public static  StringPREF_DLG_TITLE_IMG
    
 CompositeformTitleComposite
    

Constructor Summary
public  PreferenceDialog(Shell parentShell, PreferenceManager manager)
     Creates a new preference dialog under the control of the given preference manager.

Method Summary
protected  voidaddListeners(TreeViewer viewer)
     Add the listeners to the tree viewer.
public  voidaddPageChangedListener(IPageChangedListener listener)
    
protected  voidbuttonPressed(int buttonId)
    
protected  voidcancelPressed()
    
 voidclearSelectedNode()
     Clear the last selected node.
public  booleanclose()
    
protected  voidconfigureShell(Shell newShell)
    
protected  voidconstrainShellSize()
    
protected  voidcreateButtonsForButtonBar(Composite parent)
    
protected  ControlcreateContents(Composite parent)
    
protected  ControlcreateDialogArea(Composite parent)
    
protected  voidcreatePage(IPreferenceNode node)
     Create the page for the node.
protected  CompositecreatePageContainer(Composite parent)
     Creates the inner page container.
protected  voidcreatePageControl(IPreferencePage page, Composite parent)
     Create the page control for the supplied page.
protected  SashcreateSash(Composite composite, Control rightControl)
     Create the sash with right control on the right.
protected  CompositecreateTitleArea(Composite parent)
     Creates the wizard's title area.
Parameters:
  parent - the SWT parent for the title area composite.
protected  ControlcreateTreeAreaContents(Composite parent)
    
Parameters:
  parent - the SWT parent for the tree area controls.
protected  TreeViewercreateTreeViewer(Composite parent)
     Create a new TreeViewer.
Parameters:
  parent - the parent Composite.
protected  IPreferenceNodefindNodeMatching(String nodeId)
     Find the IPreferenceNode that has data the same id as the supplied value.
Parameters:
  nodeId - the id to search for.
protected  voidfirePageChanged(PageChangedEvent event)
     Notifies any selection changed listeners that the selected page has changed.
protected  IPreferencePagegetCurrentPage()
     Returns the currentPage.
protected  intgetLastRightWidth()
     Get the last known right side width.
protected  IPreferencePagegetPage(IPreferenceNode node)
     Get the page for the node.
protected  CompositegetPageContainer()
     Get the composite that is showing the page.
protected  LayoutgetPageLayout()
     Return the layout for the composite that contains the pages.
public  PreferenceManagergetPreferenceManager()
     Returns the preference mananger used by this preference dialog.
public  IPreferenceStoregetPreferenceStore()
    
protected  StringgetSelectedNodePreference()
    
public  ObjectgetSelectedPage()
    
protected  IPreferenceNodegetSingleSelection(ISelection selection)
    
Parameters:
  selection - the ISelection to examine.
public  TreeViewergetTreeViewer()
    
protected  voidhandleSave()
     Save the values specified in the pages.
protected  voidhandleShellCloseEvent()
     Notifies that the window's close button was pressed, the close menu was selected, or the ESCAPE key pressed.

The default implementation of this framework method sets the window's return code to CANCEL and closes the window using close.

protected  voidhelpPressed()
     Notifies of the pressing of the Help button.
protected  booleanisCurrentPageValid()
     Returns whether the current page is valid.
protected  booleanisResizable()
    
protected  voidlayoutTreeAreaControl(Control control)
    
protected  voidokPressed()
     The preference dialog implementation of this Dialog framework method sends performOk to all pages of the preference dialog, then calls handleSave on this dialog to save any state, and then calls close to close this dialog.
public  voidremovePageChangedListener(IPageChangedListener listener)
    
 voidselectCurrentPageAgain()
     Selects the page determined by lastSuccessfulNode in the page hierarchy.
protected  voidselectSavedItem()
     Selects the saved item in the tree of preference pages.
protected  voidsetCurrentPage(IPreferencePage currentPage)
     Sets the current page.
public  voidsetErrorMessage(String newErrorMessage)
     Display the given error message.
public  voidsetMessage(String newMessage)
     Set the message text.
public  voidsetMessage(String newMessage, int newType)
     Sets the message for this dialog with an indication of what type of message it is.

The valid message types are one of NONE, INFORMATION,WARNING, or ERROR.

Note that for backward compatibility, a message of type ERROR is different than an error message (set using setErrorMessage).

public  voidsetMinimumPageSize(int minWidth, int minHeight)
     Sets the minimum page size.
public  voidsetMinimumPageSize(Point size)
     Sets the minimum page size.
protected  voidsetPageContainer(Composite pageContainer)
     Set the composite that is showing the page.
public  voidsetPreferenceStore(IPreferenceStore store)
     Sets the preference store for this preference dialog.
public  voidsetSelectedNode(String pageId)
     Sets the name of the selected item preference.
protected  voidsetSelectedNodePreference(String pageId)
     Sets the name of the selected item preference.
protected  voidsetTreeViewer(TreeViewer treeViewer)
     Set the treeViewer.
protected  booleanshowPage(IPreferenceNode node)
     Shows the preference page corresponding to the given preference node.
 voidshowPageFlippingAbortDialog()
     Shows the "Page Flipping abort" dialog.
protected  voidupdate()
     Updates this dialog's controls to reflect the current page.
public  voidupdateButtons()
    
public  voidupdateMessage()
    
public  voidupdateTitle()
    
protected  voidupdateTreeFont(Font dialogFont)
     Update the tree to use the specified Font.

Field Detail
FAILED
final protected static int FAILED(Code)
Return code used when dialog failed



PREF_DLG_IMG_TITLE_ERROR
final public static String PREF_DLG_IMG_TITLE_ERROR(Code)
Indentifier for the error image



PREF_DLG_TITLE_IMG
final public static String PREF_DLG_TITLE_IMG(Code)
Title area fields



formTitleComposite
Composite formTitleComposite(Code)
Composite with a FormLayout to contain the title area




Constructor Detail
PreferenceDialog
public PreferenceDialog(Shell parentShell, PreferenceManager manager)(Code)
Creates a new preference dialog under the control of the given preference manager.
Parameters:
  parentShell - the parent shell
Parameters:
  manager - the preference manager




Method Detail
addListeners
protected void addListeners(TreeViewer viewer)(Code)
Add the listeners to the tree viewer.
Parameters:
  viewer -
since:
   3.1



addPageChangedListener
public void addPageChangedListener(IPageChangedListener listener)(Code)

See Also:   org.eclipse.jface.dialogs.IPageChangeProvider.addPageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener)
since:
   3.1



buttonPressed
protected void buttonPressed(int buttonId)(Code)



cancelPressed
protected void cancelPressed()(Code)



clearSelectedNode
void clearSelectedNode()(Code)
Clear the last selected node. This is so that we not chache the last selection in case of an error.



close
public boolean close()(Code)



configureShell
protected void configureShell(Shell newShell)(Code)



constrainShellSize
protected void constrainShellSize()(Code)



createButtonsForButtonBar
protected void createButtonsForButtonBar(Composite parent)(Code)



createContents
protected Control createContents(Composite parent)(Code)



createDialogArea
protected Control createDialogArea(Composite parent)(Code)



createPage
protected void createPage(IPreferenceNode node)(Code)
Create the page for the node.
Parameters:
  node -
since:
   3.1



createPageContainer
protected Composite createPageContainer(Composite parent)(Code)
Creates the inner page container.
Parameters:
  parent - Composite



createPageControl
protected void createPageControl(IPreferencePage page, Composite parent)(Code)
Create the page control for the supplied page.
Parameters:
  page - - the preference page to be shown
Parameters:
  parent - - the composite to parent the page
since:
   3.1



createSash
protected Sash createSash(Composite composite, Control rightControl)(Code)
Create the sash with right control on the right. Note that this method assumes GridData for the layout data of the rightControl.
Parameters:
  composite -
Parameters:
  rightControl - Sash
since:
   3.1



createTitleArea
protected Composite createTitleArea(Composite parent)(Code)
Creates the wizard's title area.
Parameters:
  parent - the SWT parent for the title area composite. the created title area composite.



createTreeAreaContents
protected Control createTreeAreaContents(Composite parent)(Code)

Parameters:
  parent - the SWT parent for the tree area controls. the new Control.
since:
   3.0



createTreeViewer
protected TreeViewer createTreeViewer(Composite parent)(Code)
Create a new TreeViewer.
Parameters:
  parent - the parent Composite. the TreeViewer.
since:
   3.0



findNodeMatching
protected IPreferenceNode findNodeMatching(String nodeId)(Code)
Find the IPreferenceNode that has data the same id as the supplied value.
Parameters:
  nodeId - the id to search for. IPreferenceNode or null if notfound.



firePageChanged
protected void firePageChanged(PageChangedEvent event)(Code)
Notifies any selection changed listeners that the selected page has changed. Only listeners registered at the time this method is called are notified.
Parameters:
  event - a selection changed event
See Also:   IPageChangedListener.pageChanged
since:
   3.1



getCurrentPage
protected IPreferencePage getCurrentPage()(Code)
Returns the currentPage. IPreferencePage
since:
   3.1



getLastRightWidth
protected int getLastRightWidth()(Code)
Get the last known right side width. the width.



getPage
protected IPreferencePage getPage(IPreferenceNode node)(Code)
Get the page for the node.
Parameters:
  node - IPreferencePage
since:
   3.1



getPageContainer
protected Composite getPageContainer()(Code)
Get the composite that is showing the page. Composite.
since:
   3.1



getPageLayout
protected Layout getPageLayout()(Code)
Return the layout for the composite that contains the pages. PageLayout
since:
   3.1



getPreferenceManager
public PreferenceManager getPreferenceManager()(Code)
Returns the preference mananger used by this preference dialog. the preference mananger



getPreferenceStore
public IPreferenceStore getPreferenceStore()(Code)



getSelectedNodePreference
protected String getSelectedNodePreference()(Code)
Get the name of the selected item preference String



getSelectedPage
public Object getSelectedPage()(Code)

See Also:   org.eclipse.jface.dialogs.IPageChangeProvider.getSelectedPage
since:
   3.1



getSingleSelection
protected IPreferenceNode getSingleSelection(ISelection selection)(Code)

Parameters:
  selection - the ISelection to examine. the first element, or null if empty.



getTreeViewer
public TreeViewer getTreeViewer()(Code)
the TreeViewer for this dialog.
since:
   3.3



handleSave
protected void handleSave()(Code)
Save the values specified in the pages.

The default implementation of this framework method saves all pages of type PreferencePage (if their store needs saving and is a PreferenceStore).

Subclasses may override.




handleShellCloseEvent
protected void handleShellCloseEvent()(Code)
Notifies that the window's close button was pressed, the close menu was selected, or the ESCAPE key pressed.

The default implementation of this framework method sets the window's return code to CANCEL and closes the window using close. Subclasses may extend or reimplement.




helpPressed
protected void helpPressed()(Code)
Notifies of the pressing of the Help button.

The default implementation of this framework method calls performHelp on the currently active page.




isCurrentPageValid
protected boolean isCurrentPageValid()(Code)
Returns whether the current page is valid. false if the current page is not valid, or ortrue if the current page is valid or there is nocurrent page



isResizable
protected boolean isResizable()(Code)



layoutTreeAreaControl
protected void layoutTreeAreaControl(Control control)(Code)

Parameters:
  control - the Control to lay out.
since:
   3.0



okPressed
protected void okPressed()(Code)
The preference dialog implementation of this Dialog framework method sends performOk to all pages of the preference dialog, then calls handleSave on this dialog to save any state, and then calls close to close this dialog.



removePageChangedListener
public void removePageChangedListener(IPageChangedListener listener)(Code)

See Also:   org.eclipse.jface.dialogs.IPageChangeProvider.removePageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener)
since:
   3.1



selectCurrentPageAgain
void selectCurrentPageAgain()(Code)
Selects the page determined by lastSuccessfulNode in the page hierarchy.



selectSavedItem
protected void selectSavedItem()(Code)
Selects the saved item in the tree of preference pages. If it cannot do this it saves the first one.



setCurrentPage
protected void setCurrentPage(IPreferencePage currentPage)(Code)
Sets the current page.
Parameters:
  currentPage -
since:
   3.1



setErrorMessage
public void setErrorMessage(String newErrorMessage)(Code)
Display the given error message. The currently displayed message is saved and will be redisplayed when the error message is set to null.
Parameters:
  newErrorMessage - the errorMessage to display or null



setMessage
public void setMessage(String newMessage)(Code)
Set the message text. If the message line currently displays an error, the message is stored and will be shown after a call to clearErrorMessage

Shortcut for setMessage(newMessage, NONE)


Parameters:
  newMessage - the message, or null to clear the message



setMessage
public void setMessage(String newMessage, int newType)(Code)
Sets the message for this dialog with an indication of what type of message it is.

The valid message types are one of NONE, INFORMATION,WARNING, or ERROR.

Note that for backward compatibility, a message of type ERROR is different than an error message (set using setErrorMessage). An error message overrides the current message until the error message is cleared. This method replaces the current message and does not affect the error message.


Parameters:
  newMessage - the message, or null to clear the message
Parameters:
  newType - the message type
since:
   2.0



setMinimumPageSize
public void setMinimumPageSize(int minWidth, int minHeight)(Code)
Sets the minimum page size.
Parameters:
  minWidth - the minimum page width
Parameters:
  minHeight - the minimum page height
See Also:   PreferenceDialog.setMinimumPageSize(Point)



setMinimumPageSize
public void setMinimumPageSize(Point size)(Code)
Sets the minimum page size.
Parameters:
  size - the page size encoded as new Point(width,height)
See Also:   PreferenceDialog.setMinimumPageSize(int,int)



setPageContainer
protected void setPageContainer(Composite pageContainer)(Code)
Set the composite that is showing the page.
Parameters:
  pageContainer - Composite
since:
   3.1



setPreferenceStore
public void setPreferenceStore(IPreferenceStore store)(Code)
Sets the preference store for this preference dialog.
Parameters:
  store - the preference store
See Also:   PreferenceDialog.getPreferenceStore



setSelectedNode
public void setSelectedNode(String pageId)(Code)
Sets the name of the selected item preference. Public equivalent to setSelectedNodePreference.
Parameters:
  pageId - The identifier for the page
since:
   3.0



setSelectedNodePreference
protected void setSelectedNodePreference(String pageId)(Code)
Sets the name of the selected item preference.
Parameters:
  pageId - The identifier for the page



setTreeViewer
protected void setTreeViewer(TreeViewer treeViewer)(Code)
Set the treeViewer.
Parameters:
  treeViewer -
since:
   3.1



showPage
protected boolean showPage(IPreferenceNode node)(Code)
Shows the preference page corresponding to the given preference node. Does nothing if that page is already current.
Parameters:
  node - the preference node, or null if none true if the page flip was successful, andfalse is unsuccessful



showPageFlippingAbortDialog
void showPageFlippingAbortDialog()(Code)
Shows the "Page Flipping abort" dialog.



update
protected void update()(Code)
Updates this dialog's controls to reflect the current page.



updateButtons
public void updateButtons()(Code)



updateMessage
public void updateMessage()(Code)



updateTitle
public void updateTitle()(Code)



updateTreeFont
protected void updateTreeFont(Font dialogFont)(Code)
Update the tree to use the specified Font.
Parameters:
  dialogFont - the Font to use.
since:
   3.0



Methods inherited from org.eclipse.jface.dialogs.TrayDialog
public boolean close()(Code)(Java Doc)
public void closeTray() throws IllegalStateException(Code)(Java Doc)
protected Control createButtonBar(Composite parent)(Code)(Java Doc)
protected Control createHelpControl(Composite parent)(Code)(Java Doc)
protected Layout getLayout()(Code)(Java Doc)
public DialogTray getTray()(Code)(Java Doc)
public static boolean isDialogHelpAvailable()(Code)(Java Doc)
public boolean isHelpAvailable()(Code)(Java Doc)
public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException(Code)(Java Doc)
public static void setDialogHelpAvailable(boolean helpAvailable)(Code)(Java Doc)
public void setHelpAvailable(boolean helpAvailable)(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.