|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.application.preferences.JbbUserPreferences
public class JbbUserPreferences
This class is used to save/retrieve the user preferences for a given client side application. Please note that this is different than the ApplicationParameters that are appplicable to all user sof the application
| Constructor Summary | |
|---|---|
JbbUserPreferences()
constructor |
|
| Method Summary | |
|---|---|
Color |
getColorPreference(String zKey)
Retrieve the color value associated to the given key |
static JbbUserPreferences |
getInstance()
This method returns an instance of the UserPreferences class. |
String |
getPreference(String zKey)
Retrieve the value associated to the given key |
ArrayList<String> |
getPreferences(String zParentKey,
String zChildrenKey)
To retrieve a preference that is multi-valued: this method retrieves all the values associated to the given parent key and the child key (i.e. |
void |
initialize(String zPreferencesFileName)
Open the preferences file (if any) |
boolean |
isInitialized()
|
void |
save(String zPreferencesFileName)
Save the preferences file |
void |
setColorPreference(String zKey,
Color zValue)
Set the color value associated to the given key |
void |
setPreference(String zKey,
String zValue)
Set the value associated to the given key |
void |
setPreferences(String zParentKey,
String zChildrenKey,
ArrayList<String> zValues)
To set a preference that is multi-valued. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JbbUserPreferences()
| Method Detail |
|---|
public static final JbbUserPreferences getInstance()
public void initialize(String zPreferencesFileName)
throws Exception
zPreferencesFileName - the full preferences file name
Exception - if an error occurspublic boolean isInitialized()
public String getPreference(String zKey)
throws Exception
zKey - the key that identifies the preference in the preferences file
Exception - if an error occurs
public ArrayList<String> getPreferences(String zParentKey,
String zChildrenKey)
throws Exception
zParentKey - the parent key that identifies the preference in the preferences filezChildrenKey - the children key that identifies the individual values in the preferences file under the parent key
Exception - if an error occurs
public Color getColorPreference(String zKey)
throws Exception
zKey - the key that identifies the preference in the preferences file
Exception - if an error occurs
public void setPreference(String zKey,
String zValue)
throws Exception
zKey - the key that identifies the preference in the preferences filezValue - the value
Exception - if an error occurs
public void setColorPreference(String zKey,
Color zValue)
throws Exception
zKey - the key that identifies the preference in the preferences filezValue - the color value
Exception - if an error occurs
public void setPreferences(String zParentKey,
String zChildrenKey,
ArrayList<String> zValues)
throws Exception
zParentKey - the key that identifies the preference in the preferences filezChildrenKey - the key that identifies the individual value in the preferences filezValues - the values
Exception - if an error occurs
public void save(String zPreferencesFileName)
throws Exception
zPreferencesFileName - the full preferences file name
Exception - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||