Class AbstractPreferencePanel

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible
    Direct Known Subclasses:
    ApplicationPreferenceModelPanel, LogPanelPreferencePanel

    public abstract class AbstractPreferencePanel
    extends JPanel
    Some basic plumbing for Preference related dialogs. Sub classes have the following responsibilities:
    • Must call this this classes initComponents() method from within the sub-classes constructor, this method laysout the panel and calls the abstract createTreeModel method to initialise the tree of Panels.
    • Must override createTreeModel() method to return a TreeModel whose TreeNodes getUserObject() method will return a JComponent that is displayed as the selected editable Preference panel. This JComponent's .toString() method is used as the title of the preference panel
    Author:
    Paul Smith <psmith@apache.org>
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractPreferencePanel

        public AbstractPreferencePanel()
    • Method Detail

      • initComponents

        protected void initComponents()
        Setup and layout for the components
      • createTreeModel

        protected abstract TreeModel createTreeModel()
        Returns:
        tree model
      • setDisplayedPrefPanel

        protected void setDisplayedPrefPanel​(JComponent panel)
        Ensures a specific panel is displayed in the spot where preferences can be selected.
        Parameters:
        panel -
      • notifyOfLookAndFeelChange

        public void notifyOfLookAndFeelChange()
      • setOkCancelActionListener

        public void setOkCancelActionListener​(ActionListener l)
      • hidePanel

        public void hidePanel()
      • getCancelButton

        protected final JButton getCancelButton()
        Returns:
        Returns the cancelButton.
      • getOkButton

        protected final JButton getOkButton()
        Returns:
        Returns the okButton.