|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CSettingsStore
dasher.applet.JSettings
public class JSettings
Extension of CSettingsStore which uses a Java Preferences object to store settings between sessions.
This boils down to using the registry in Windows, and a hidden file in the user's profile on Unix-style systems including MacOSX.
In the current unsigned applet setup this will not get used, as a security exception is thrown on trying to instantiate Preferences and a plain old CSettingsStore will be used in lieu.
Should JDasher ever get converted to a standalone Java application or signed applet, however, this will spring into life and provide persistent settings.
I have not documented these functions, as they all implement precisely the behaviour specified in CSettingsStore.
The only noteworthy feature is that the Constructor will throw a StoreUnavailableException if unable to open the registry and/or user profile.
| Field Summary | |
|---|---|
private java.util.prefs.Preferences |
appSettings
|
| Fields inherited from class dasher.CSettingsStore |
|---|
m_pEventHandler, ParamBool, ParamInvalid, ParamLong, ParamString, s_oParamTables |
| Constructor Summary | |
|---|---|
JSettings(CEventHandler handler)
|
|
| Method Summary | |
|---|---|
protected boolean |
LoadBoolSetting(java.lang.String Key)
Loads a given boolean setting from the backing store. |
protected long |
LoadLongSetting(java.lang.String Key)
Loads a given integer setting from the backing store. |
protected java.lang.String |
LoadStringSetting(java.lang.String Key)
Loads a given String setting from the backing store. |
protected void |
SaveSetting(java.lang.String Key,
boolean Value)
Saves a given bool parameter to the backing store. |
protected void |
SaveSetting(java.lang.String Key,
long Value)
Saves a given integer parameter to the backing store. |
protected void |
SaveSetting(java.lang.String Key,
java.lang.String Value)
Saves a given string parameter to the backing store. |
| Methods inherited from class dasher.CSettingsStore |
|---|
GetBoolParameter, GetLongParameter, GetParameterName, GetParameterType, GetStringParameter, LoadPersistent, ResetParameter, SetBoolParameter, SetLongParameter, SetStringParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.prefs.Preferences appSettings
| Constructor Detail |
|---|
public JSettings(CEventHandler handler)
throws StoreUnavailableException
StoreUnavailableException| Method Detail |
|---|
protected boolean LoadBoolSetting(java.lang.String Key)
throws CParameterNotFoundException
CSettingsStore
LoadBoolSetting in class CSettingsStoreKey - Name of parameter to retrieve
CParameterNotFoundException - if loading failed, eg. because the backing
store did not contain information about this parameter.
protected long LoadLongSetting(java.lang.String Key)
throws CParameterNotFoundException
CSettingsStore
LoadLongSetting in class CSettingsStoreKey - Name of parameter to retrieve
CParameterNotFoundException - if loading failed, eg. because the backing
store did not contain information about this parameter.
protected java.lang.String LoadStringSetting(java.lang.String Key)
throws CParameterNotFoundException
CSettingsStore
LoadStringSetting in class CSettingsStoreKey - Name of parameter to retrieve
CParameterNotFoundException - if loading failed, eg. because the backing
store did not contain information about this parameter.
protected void SaveSetting(java.lang.String Key,
boolean Value)
CSettingsStore
SaveSetting in class CSettingsStoreKey - Name of the parameter to saveValue - Value of the parameter
protected void SaveSetting(java.lang.String Key,
long Value)
CSettingsStore
SaveSetting in class CSettingsStoreKey - Name of the parameter to saveValue - Value of the parameter
protected void SaveSetting(java.lang.String Key,
java.lang.String Value)
CSettingsStore
SaveSetting in class CSettingsStoreKey - Name of the parameter to saveValue - Value of the parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||