Class AbstractPreferencePage

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.gvsig.gui.beans.swing.GridBagLayoutPanel
org.gvsig.andami.preferences.AbstractPreferencePage
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, IPreference, org.gvsig.tools.extensionpoint.ExtensionBuilder

public abstract class AbstractPreferencePage extends org.gvsig.gui.beans.swing.GridBagLayoutPanel implements IPreference, org.gvsig.tools.extensionpoint.ExtensionBuilder
The abstract class that any preference page should extend.
Author:
jaume dominguez faus - jaume.dominguez@iver.es
See Also:
  • Field Details

    • y

      protected int y
      The number of components already added to the layout manager.
    • parentID

      protected String parentID
  • Constructor Details

    • AbstractPreferencePage

      public AbstractPreferencePage()
  • Method Details

    • setParentID

      public final void setParentID(String parentID)
    • getParentID

      public String getParentID()
      Description copied from interface: IPreference
      Returns the ID of the parent of this layer. If this method returns null, which means that this preferences page has no parent, this is new entry in the preferences tree, otherwise this preferences page will be hanging on the page with the ID returned by this.
      Specified by:
      getParentID in interface IPreference
      Returns:
    • setTitle

      public final void setTitle(String title)
    • toString

      public String toString()
      Overrides:
      toString in class Component
    • create

      public Object create()
      Specified by:
      create in interface org.gvsig.tools.extensionpoint.ExtensionBuilder
    • create

      public Object create(Object[] args)
      Specified by:
      create in interface org.gvsig.tools.extensionpoint.ExtensionBuilder
    • create

      public Object create(Map args)
      Specified by:
      create in interface org.gvsig.tools.extensionpoint.ExtensionBuilder
    • isResizeable

      public boolean isResizeable()
      Devuelve true si el Panel debe estar en un BorderLayout centrado o false si tiene un tamaño fijo.
      Returns:
    • saveValues

      public final void saveValues() throws StoreException
      Description copied from interface: IPreference
      Saves the new settings
      Specified by:
      saveValues in interface IPreference
      Throws:
      StoreException
    • storeValues

      public abstract void storeValues() throws StoreException

      Gathers the configurations and stores them in the system.

      storeValues() and setChangesApplied() are methods from AbstractPreferencePage not from IPreference. They both perform in combination what saveValue() should do by itself, but they exist for performance issues. In fact, you should not invoke them outside your PreferencePage class, you only need to code them.

      Throws:
      StoreException
    • setChangesApplied

      public abstract void setChangesApplied()

      After this method is invoked, the Preference page must return true as the result of invoking isValueChanged() method. It tells that the values have been saved in the system.

      storeValues() and setChangesApplied() are methods from AbstractPreferencePage not from IPreference. They both perform in combination what storeValue() should by itself, but they exist for performance issues. In fact, you should not invoke them outside your PreferencePage class, you only need to code them.