Class PreferencesPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ColorPrefsPane

public abstract class PreferencesPane extends JPanel
An abstract class for a GUI panel that can be displayed to allow the user to edit some of the user preferences. A pane may have child panes, containing additional groups of preferences relevant to but not contained on this pane.
See Also:
  • Constructor Details

    • PreferencesPane

      public PreferencesPane()
  • Method Details

    • showDialog

      public static void showDialog(JFrame f, Preferences preferences, PreferencesPane[] panes, com.sun.javatest.tool.jthelp.HelpBroker helpBroker)
      Show a dialog to allow the user to edit the set of preferences. A collection of editing panes must be provided that each provide the GUI to edit a subset of the preferences.
      Parameters:
      f - the parent frame for the dialog
      panes - the editing panes to be displayed in the dialog
      helpBroker - a help broker to be used to provide context sensitive help for the dialog
    • setHelp

      protected void setHelp(String helpID)
      Set the help ID that gives the context sensitive help for this panel. The help will be displayed in the help broker specified when the dialog is displayed.
      Parameters:
      helpID - the ID for the context sensitive help for this panel
      See Also:
    • getText

      public abstract String getText()
      Get a text string which identifies the group of user preferences that can be edited on the panel.
      Returns:
      a text string to identify the preferences on this panel
    • load

      public void load(Map<String,String> m)
      Load the values of the user preferences relevant to this panel from a given map object.
      Parameters:
      m - the map from which to load the user preferences into the GUI components
    • save

      public void save(Map<String,String> m)
      Save the values of the user preferences relevant to this panel into a given map object.
      Parameters:
      m - the map to which to save the user preferences from the GUI components
    • validateValues

      public String validateValues()
      Analyze the current values entered by the user and determine if they are valid. If they are, the return value should be null. By default the return value is null.
      Returns:
      null if all the values are valid. Otherwise, an internationalized string.
      See Also:
    • getChildPanes

      public PreferencesPane[] getChildPanes()
      Get the set of child panes, if any, containing additional groups of preferences relevant to but not contained on this pane.
      Returns:
      an array of child panes, or null if none