Class ColorPreference.ColorEntry
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.display.ColorPreference.ColorEntry
-
- Enclosing class:
- ColorPreference
private static class ColorPreference.ColorEntry extends Object
-
-
Constructor Summary
Constructors Constructor Description ColorEntry(String key, ColorInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplay()
Get a description of the color based on the given info.Color
getDisplayColor()
Get the color value to display.boolean
isDefault()
Check if color has been customized by the user or not.NamedColorProperty
toProperty()
Convert to aNamedColorProperty
.String
toString()
-
-
-
Constructor Detail
-
ColorEntry
ColorEntry(String key, ColorInfo info)
-
-
Method Detail
-
getDisplay
public String getDisplay()
Get a description of the color based on the given info.- Returns:
- a description of the color
-
getDisplayColor
public Color getDisplayColor()
Get the color value to display. Either value (if set) or default value.- Returns:
- the color value to display
-
isDefault
public boolean isDefault()
Check if color has been customized by the user or not.- Returns:
- true if the color is at its default value, false if it is customized by the user.
-
toProperty
public NamedColorProperty toProperty()
Convert to aNamedColorProperty
.- Returns:
- a
NamedColorProperty
-
-