Class ColorInfo
- java.lang.Object
-
- org.openstreetmap.josm.data.preferences.ColorInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColorInfo
fromPref(List<String> lst, boolean isDefault)
Constructs a newColorInfo
from raw preference value.String
getCategory()
Get the category.Color
getDefaultValue()
Get the default value for this color setting.String
getName()
Get the name.String
getSource()
Get the source.Color
getValue()
Get the color value in the preferences (if set).void
setCategory(String category)
Set the category.void
setDefaultValue(Color defaultValue)
Set the default value.void
setName(String name)
Set the name.void
setSource(String source)
Set the source.void
setValue(Color value)
Set the color value.String
toString()
-
-
-
Constructor Detail
-
ColorInfo
public ColorInfo()
Constructs a newColorInfo
.
-
ColorInfo
public ColorInfo(String category, String source, String name, Color value, Color defaultValue)
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:
NamedColorProperty
-
-
Method Detail
-
getCategory
public String getCategory()
Get the category.- Returns:
- the category
-
getValue
public Color getValue()
Get the color value in the preferences (if set).- Returns:
- the color value, can be null
-
getDefaultValue
public Color getDefaultValue()
Get the default value for this color setting.- Returns:
- the default value, can be null
-
setCategory
public void setCategory(String category)
Set the category.- Parameters:
category
- the category
-
setDefaultValue
public void setDefaultValue(Color defaultValue)
Set the default value.- Parameters:
defaultValue
- the default value
-
fromPref
public static ColorInfo fromPref(List<String> lst, boolean isDefault)
Constructs a newColorInfo
from raw preference value.- Parameters:
lst
- the listisDefault
- if the list represents a default value or not- Returns:
- corresponding
ColorInfo
object or null in case of invalid input
-
-