public class PreferencesUIHelper extends PreferencesHelper
Constructor and Description |
---|
PreferencesUIHelper() |
Modifier and Type | Method and Description |
---|---|
static Color |
getColor(Preferences prefs,
String key,
Color defColor)
Returns the Color represented by the string associated with the specified key
in this preference node.
|
static void |
putColor(Preferences prefs,
String key,
Color color)
Associates a string representing the specified Color with the specified key
in this preference node.
|
getBooleanArray, getFile, getFile, getFileName, getFileRelativeTo, getFiles, getFilesRelativeTo, getMap, getMapForClass, getNumbers, getObject, getObject, getStringArray, putBooleanArray, putFile, putFileName, putFileRelativeTo, putFiles, putFilesRelativeTo, putMap, putMapForClass, putNumbers, putNumbers, putObject, putStringArray
public static void putColor(Preferences prefs, String key, Color color)
The Color will be stored as a String with this pattern :
<red>;<green>;<blue>;<alpha>where red, green blue, and alpha are the integer values or the sRGB Color representation of the Color.
prefs
- the Preferenceskey
- the keycolor
- the Colorpublic static Color getColor(Preferences prefs, String key, Color defColor)
prefs
- the preferences nodekey
- the keydefColor
- the default ColorputColor(Preferences, String, Color)