Class ColorInfo
java.lang.Object
org.openstreetmap.josm.data.preferences.ColorInfo
Data class to hold information on a named color setting.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorInfoConstructs a newColorInfofrom raw preference value.Get the category.Get the default value for this color setting.getName()Get the name.Get the source.getValue()Get the color value in the preferences (if set).voidsetCategory(String category) Set the category.voidsetDefaultValue(Color defaultValue) Set the default value.voidSet the name.voidSet the source.voidSet the color value.toString()
-
Field Details
-
category
-
source
-
name
-
value
-
defaultValue
-
-
Constructor Details
-
ColorInfo
public ColorInfo()Constructs a newColorInfo. -
ColorInfo
Constructs a newColorInfo.- Parameters:
category- the category of the color settingsource- the source (related file), can be nullname- the color namevalue- the color value set in the preferences, null if not setdefaultValue- the default value for this color setting, can be null- See Also:
-
-
Method Details
-
getCategory
Get the category.- Returns:
- the category
-
getSource
Get the source.- Returns:
- the source, can be null
-
getName
Get the name.- Returns:
- the name
-
getValue
Get the color value in the preferences (if set).- Returns:
- the color value, can be null
-
getDefaultValue
Get the default value for this color setting.- Returns:
- the default value, can be null
-
setCategory
Set the category.- Parameters:
category- the category
-
setSource
Set the source.- Parameters:
source- the source
-
setName
Set the name.- Parameters:
name- the name
-
setValue
Set the color value.- Parameters:
value- the value
-
setDefaultValue
Set the default value.- Parameters:
defaultValue- the default value
-
fromPref
Constructs a newColorInfofrom raw preference value.- Parameters:
lst- the listisDefault- if the list represents a default value or not- Returns:
- corresponding
ColorInfoobject or null in case of invalid input
-
toString
-