Package mars.settings
Class FontSetting
java.lang.Object
mars.settings.FontSetting
Class representing a persistent font setting and its current value.
- 
Method SummaryModifier and TypeMethodDescriptionstatic FontDecode aFontobject from a string with the formNameorName;Attributes, whereAttributesis a comma-separated list of optional attributes:Bold: If present, sets the bold style flag.static StringEncode aFontobject as a string with the formNameorName;Attributes, whereAttributesis a comma-separated list of optional attributes:Bold: Will be present if the bold style flag is set.get()Get the value currently stored in this setting.Get the default value for this setting.getKey()Get the key used to identify this setting inPreferences.voidSet the value of this setting, updating persistent storage.voidsetDefault(Font value) Set the default value for this setting without updating the current value.voidsetNonPersistent(Font value) Set the value of this setting without updating persistent storage.
- 
Method Details- 
getKeyGet the key used to identify this setting inPreferences.- Returns:
- The string key for this setting.
 
- 
getGet the value currently stored in this setting.- Returns:
- The font value for this setting.
 
- 
setSet the value of this setting, updating persistent storage.- Parameters:
- value- The new font value for this setting.
 
- 
getDefaultGet the default value for this setting.- Returns:
- The default font value for this setting.
 
- 
setDefaultSet the default value for this setting without updating the current value.- Parameters:
- value- The new font string value for this setting.
 
- 
setNonPersistentSet the value of this setting without updating persistent storage.- Parameters:
- value- The new font value for this setting.
 
- 
encodeEncode aFontobject as a string with the formNameorName;Attributes, whereAttributesis a comma-separated list of optional attributes:- Bold: Will be present if the bold style flag is set.
- Italic: Will be present if the italic style flag is set.
- Size=N: Specifies the font point size- N.
 - Parameters:
- font- The font to encode as a string.
- Returns:
- The encoded form of the given font, or null if the font is null.
- See Also:
 
- 
decodeDecode aFontobject from a string with the formNameorName;Attributes, whereAttributesis a comma-separated list of optional attributes:- Bold: If present, sets the bold style flag.
- Italic: If present, sets the italic style flag.
- Size=N: Sets the font point size to- N. If not present, defaults to 12.
 - Parameters:
- string- The string to decode as a font.
- Returns:
- The font decoded from the given string.
- See Also:
 
 
-