Package geomss.app
Class AppPreferences
- java.lang.Object
-
- geomss.app.AppPreferences
-
- All Implemented Interfaces:
Preferences
- Direct Known Subclasses:
GUIPreferences
public class AppPreferences extends java.lang.Object implements Preferences
This class serves as a collection of preferences for this program.Modified by: Joseph A. Huwaldt
- Version:
- January 1, 2024
- Author:
- Joseph A. Huwaldt, Date: May 2, 2009
-
-
Constructor Summary
Constructors Constructor Description AppPreferences()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)java.lang.Stringget(java.lang.String key)Return the preference with the specified key String.java.lang.StringgetLastPath()Returns the file path to the parent of the last referenced file.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)voidset(java.lang.String key, java.lang.String value)Set the preference with the specified key String.voidsetLastPath(java.lang.String path)Set the last file path referenced by the user.voidshowPreferenceDialog()Method that displays a dialog that allows the user to change the application preferences.
-
-
-
Constructor Detail
-
AppPreferences
public AppPreferences()
-
-
Method Detail
-
getLastPath
public java.lang.String getLastPath()
Returns the file path to the parent of the last referenced file. Returns null if no last path could be found.- Specified by:
getLastPathin interfacePreferences- Returns:
- The file path to the parent of the last referenced file.
-
setLastPath
public void setLastPath(java.lang.String path)
Set the last file path referenced by the user. This is the path to the last parent of the last referenced file.- Specified by:
setLastPathin interfacePreferences- Parameters:
path- The last file path referenced by the user.
-
get
public java.lang.String get(java.lang.String key)
Return the preference with the specified key String.- Specified by:
getin interfacePreferences- Parameters:
key- The key String identifying the preference to be retrieved. May not be null.- Returns:
- The preference with the specified key String.
-
set
public void set(java.lang.String key, java.lang.String value)
Set the preference with the specified key String.- Specified by:
setin interfacePreferences- Parameters:
key- The key String identifying the preference to be set. May not be null.value- THe String value to store as the preference. May not be null.
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
-
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)
-
showPreferenceDialog
public void showPreferenceDialog()
Method that displays a dialog that allows the user to change the application preferences. This implementation does nothing.- Specified by:
showPreferenceDialogin interfacePreferences
-
-