public class AppPreferences extends java.lang.Object implements Preferences
Modified by: Joseph A. Huwaldt
Constructor and Description |
---|
AppPreferences()
Construct the preferences object for this application.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String key)
Return the preference with the specified key String.
|
java.lang.String |
getLastPath()
Returns the file path to the parent of the last referenced file.
|
void |
set(java.lang.String key,
java.lang.String value)
Set the preference with the specified key String.
|
void |
setLastPath(java.lang.String path)
Set the last file path referenced by the user.
|
void |
showPreferenceDialog()
Method that displays a dialog that allows the user to change the application
preferences.
|
public AppPreferences()
public java.lang.String getLastPath()
Preferences
getLastPath
in interface Preferences
public void setLastPath(java.lang.String path)
setLastPath
in interface Preferences
path
- The path to the last file referenced by the user. May not be null.public java.lang.String get(java.lang.String key)
get
in interface Preferences
key
- The key String identifying the preference to be retrieved. May not be
null.public void set(java.lang.String key, java.lang.String value)
set
in interface Preferences
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.public void showPreferenceDialog()
showPreferenceDialog
in interface Preferences