| java.lang.Object com.ibm.rbm.Preferences
Preferences | public class Preferences (Code) | | This class defines the methods used by RBManager to access, set, and store
individual user preferences for the application. All of the public methods defined
in this class are static, and so the class need not be instantiated.
author: Jared Jackson See Also: com.ibm.rbm.RBManager |
Method Summary | |
public static void | addRecentFilePreference(String name, String location) Given the name of a resource bundle and the file path location of the base
document for that resource bundle, this method will insert that file into
a list of recent files. | public static String | getPreference(String name) | public static Vector | getRecentFilesPreferences() Returns a list of the names and locations of the various recently used files.
A Vector of Strings which is twice in length the number of files known about. | public static void | savePreferences() Writes the results of the buffered preferences to file. | public static void | setPreference(String name, String value) Sets a preference by key name and value. |
addRecentFilePreference | public static void addRecentFilePreference(String name, String location)(Code) | | Given the name of a resource bundle and the file path location of the base
document for that resource bundle, this method will insert that file into
a list of recent files. Currently the past 4 resource bundles visited will
be displayed. This method also sorts the prefences so that the most recently
added will be the first returned, even if that file had all ready existed
in the preferences when it was added.
Parameters: name - The name of this file as it will be displayed to the user Parameters: location - The file path to this file (should be absolute). |
getPreference | public static String getPreference(String name)(Code) | | Retrieve a preference by its key name
Parameters: name - The name of the key associated with one preference The value of the preference sought |
getRecentFilesPreferences | public static Vector getRecentFilesPreferences()(Code) | | Returns a list of the names and locations of the various recently used files.
A Vector of Strings which is twice in length the number of files known about. The vector contains name 1 then location 1, then name 2 ... |
savePreferences | public static void savePreferences() throws IOException(Code) | | Writes the results of the buffered preferences to file. There is no option for
where this file is saved on the file system.
|
setPreference | public static void setPreference(String name, String value)(Code) | | Sets a preference by key name and value. If the key name all ready exists, that
preference is overwritten without warning.
Parameters: name - The name of the key associated with the preference Parameters: value - The value of the preference to be set and later retrieved. If this value is null, the property of this name is erased. |
|
|