Package org.gvsig.andami.preferences
Interface IPreference
- All Superinterfaces:
org.gvsig.tools.extensionpoint.ExtensionBuilder
- All Known Implementing Classes:
AbstractPreferencePage
public interface IPreference
extends org.gvsig.tools.extensionpoint.ExtensionBuilder
Interface that any entry in the application's preferences dialog must implement.
In addition to this interface, an abstract class is supplied to ease the addition
of new pages
- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()Returns the image that will be shown in the header of this preferences pagegetID()Returns an identifier for this preferences page that is used to reference it inside the Map.getPanel()The page must be contained in a JPanel and whatever to be shown will be returned by this function.Returns the ID of the parent of this layer.getTitle()Returns an string containing the title of the preferences page.voidRestores the default values of this preferences page's settings.voidInitializes the components of this preferences page to the last settings.booleanTells if this preference page has changed any value (used for storing values when necessary)voidSaves the new settingsMethods inherited from interface org.gvsig.tools.extensionpoint.ExtensionBuilder
create, create, create
-
Field Details
-
ACCESS_PREFERENCES_PAGE_AUTHORIZATION
- See Also:
-
-
Method Details
-
getID
String getID()Returns an identifier for this preferences page that is used to reference it inside the Map.- Returns:
- String, you'd typically use any kind of
this.getClass().getName();
-
getTitle
String getTitle()Returns an string containing the title of the preferences page. This string will be shown whether in the tree entry or in the page header.- Returns:
- String, the title of the page
-
getPanel
JPanel getPanel()The page must be contained in a JPanel and whatever to be shown will be returned by this function.
The content is added, removed and repainted automatically upon the events received from the mouse. So, you only have to care about the content and the functionality to make it
having sense.
- Returns:
- JPanel holding the contents to be shown in the page.
-
getParentID
String getParentID()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.- Returns:
-
initializeValues
void initializeValues()Initializes the components of this preferences page to the last settings. -
saveValues
Saves the new settings- Throws:
StoreException
-
initializeDefaults
void initializeDefaults()Restores the default values of this preferences page's settings. Values are not saved until saveValues() is executed -
getIcon
ImageIcon getIcon()Returns the image that will be shown in the header of this preferences page- Returns:
-
isValueChanged
boolean isValueChanged()Tells if this preference page has changed any value (used for storing values when necessary)- Returns:
- True if any value has changed, false otherwise.
-