|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
java.util.Properties
com.valhalla.settings.Settings
A singleton Properties class to access and save settings
Field Summary |
Fields inherited from class java.util.Properties |
defaults |
Method Summary | |
boolean |
getBoolean(java.lang.String key)
Gets a boolean value |
static Settings |
getInstance()
Gets the Settings instance |
java.io.File |
getSettingsDir()
Gets the settings directory |
java.io.File |
getSettingsFile()
Gets the settings file |
static void |
loadSettings(java.lang.String dir,
java.lang.String settingsFile)
Reads the settings file and sets up the singleton |
void |
setBoolean(java.lang.String key,
boolean value)
Sets a boolean |
static void |
setSettings(java.util.Properties settings)
Sets the settings |
static void |
writeSettings()
Writes the settings to the settings file |
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static void loadSettings(java.lang.String dir, java.lang.String settingsFile)
dir
- the settings directorysettingsFile
- the settings filepublic static Settings getInstance()
public java.io.File getSettingsDir()
public java.io.File getSettingsFile()
public boolean getBoolean(java.lang.String key)
key
- the key to get a boolean for
public void setBoolean(java.lang.String key, boolean value)
key
- the key to setvalue
- the value to set the key topublic static void setSettings(java.util.Properties settings)
settings
- the settings to set it topublic static void writeSettings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |