|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ext.jflexsett.settings.Settings
Contains all Settings Groups and there settings. The Settings class is the only class which needs to be referenced to add groups, add settings, get settings and get values of settings.
Constructor Summary | |
Settings()
|
Method Summary | |
void |
addGroup(java.lang.String sKey,
SettingsGroup group)
Adds a group to the hashtable. |
void |
addSetting(java.lang.String sGroupKey,
Setting setting)
Adds a setting to a specified group. |
java.util.Vector |
getFlatSettingsGroups()
Retrieves all settings groups without an hierarchy |
Setting |
getSetting(java.lang.String sSettingsKey)
Retrieves a setting |
java.util.Vector |
getSettings()
Retrieves all the settings |
java.io.File |
getSettingsFile()
|
java.util.LinkedHashMap |
getSettingsGroups()
Retrieves all the top-level groups |
java.lang.Object |
getValue(java.lang.String sKey)
Retrieves a value of a settings |
boolean |
getValueAsBoolean(java.lang.String key)
Returns the value of the setting as a boolean |
java.awt.Color |
getValueAsColor(java.lang.String key)
Returns the value of the setting as a color object |
Definitions |
getValueAsDefinitionGroup(java.lang.String key)
|
java.awt.Dimension |
getValueAsDimension(java.lang.String key)
Returns the value of the setting as a String |
java.awt.Font |
getValueAsFont(java.lang.String key)
|
int |
getValueAsInt(java.lang.String sKey)
Returns the value of the setting as an integer |
int[] |
getValueAsIntegerArray(java.lang.String key)
|
java.lang.String |
getValueAsString(java.lang.String sKey)
Returns the value of the setting as a String |
java.lang.String[] |
getValueAsStringArray(java.lang.String key)
Returns the value of the setting as a String array |
boolean |
isSettingKeyValid(java.lang.String sKey)
|
void |
setSettingsFile(java.io.File file)
Specifies the location and name of the settings file |
void |
setStringAsValue(java.lang.String sKey,
java.lang.String sValue)
Sets a string as a value for the setting (by parsing the string) |
void |
setValue(java.lang.String sKey,
java.lang.Object oValue)
Sets the value of a setting |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Settings()
Method Detail |
public void addGroup(java.lang.String sKey, SettingsGroup group)
sKey
- unique identifier for this groupgroup
- a top-level group (parent)public void setSettingsFile(java.io.File file)
file
- the settings filepublic java.io.File getSettingsFile()
public void addSetting(java.lang.String sGroupKey, Setting setting)
sGroupKey
- the key of the groupsetting
- the setting to be added to the specified grouppublic boolean isSettingKeyValid(java.lang.String sKey)
public Setting getSetting(java.lang.String sSettingsKey)
sSettingsKey
- the settings keypublic java.lang.Object getValue(java.lang.String sKey)
sKey
- the settings keypublic java.lang.String[] getValueAsStringArray(java.lang.String key)
public int[] getValueAsIntegerArray(java.lang.String key)
public Definitions getValueAsDefinitionGroup(java.lang.String key)
public java.awt.Font getValueAsFont(java.lang.String key)
public int getValueAsInt(java.lang.String sKey)
sKey
- the settings keypublic boolean getValueAsBoolean(java.lang.String key)
public java.awt.Color getValueAsColor(java.lang.String key)
public java.awt.Dimension getValueAsDimension(java.lang.String key)
public java.lang.String getValueAsString(java.lang.String sKey)
sKey
- the settings keypublic void setValue(java.lang.String sKey, java.lang.Object oValue)
sKey
- the settings keyoValue
- the valuepublic void setStringAsValue(java.lang.String sKey, java.lang.String sValue)
sKey
- the settings keysValue
- the string value to be parsedpublic java.util.LinkedHashMap getSettingsGroups()
public java.util.Vector getFlatSettingsGroups()
public java.util.Vector getSettings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |