Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/property/PropertyPage.java


1   package javax.ide.property;
2   
3   import java.util.prefs.Preferences;
4   import javax.ide.command.Context;
5   import javax.ide.view.GUIPanel;
6   import javax.ide.view.Viewable;
7   
8   /**
9    * The <code>PropertyPage</code> interface lets client introduce new property 
10   * pages for setting IDE and project preferences.
11   */
12  public abstract class PropertyPage implements Viewable
13  {
14    /**
15     * Get the root graphical user interface component. This component 
16     * will be hosted by the IDE.
17     */
18    public abstract GUIPanel  getGUI();
19  
20    /**
21     * Method called when this page is selected by the user. Implementors 
22     * are responsible for initializing the GUI with the data provided by 
23     * the <code>preferences</code> object.
24     *
25     * @param preferences The data used to initialize the GUI.
26     *
27     * @param context The current {@link Context}.
28     */
29    public void onEntry( Preferences preferences, Context context )
30    {
31      
32    }
33  
34    /**
35     * Method called when users leave this page for another page
36     * and when they press the dialog's OK button.  Implementors 
37     * are responsible for getting the information entered by the 
38     * user and updating the <code>preferences</code> object.
39     *
40     * @param preferences The data used to initialize the GUI.
41     * @param context The current {@link Context}.
42     *
43     * @exception InvalidPropertyException This exception is thrown when the 
44     * user tries to leave the page and the information entered does not 
45     * validate.
46     */
47    public void onExit( Preferences preferences, 
48                        Context context ) throws InvalidPropertyException
49    {
50      
51    }
52    
53    /**
54     * Get the property keys this property page uses in the preferences object.
55     * This method is provided so that IDEs can potentially perform optimizations
56     * (e.g. avoid modifying a physical project file until real changes are made)
57     * 
58     * @return the property keys used by this page.
59     */
60    public String[] getKeys()
61    {
62      return new String[ 0 ];
63    }
64  }