public class ColorInfo extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
category |
private java.awt.Color |
defaultValue |
private java.lang.String |
name |
private java.lang.String |
source |
private java.awt.Color |
value |
| Constructor and Description |
|---|
ColorInfo()
Constructs a new
ColorInfo. |
ColorInfo(java.lang.String category,
java.lang.String source,
java.lang.String name,
java.awt.Color value,
java.awt.Color defaultValue)
Constructs a new
ColorInfo. |
| Modifier and Type | Method and Description |
|---|---|
static ColorInfo |
fromPref(java.util.List<java.lang.String> lst,
boolean isDefault)
Constructs a new
ColorInfo from raw preference value. |
java.lang.String |
getCategory()
Get the category.
|
java.awt.Color |
getDefaultValue()
Get the default value for this color setting.
|
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getSource()
Get the source.
|
java.awt.Color |
getValue()
Get the color value in the preferences (if set).
|
void |
setCategory(java.lang.String category)
Set the category.
|
void |
setDefaultValue(java.awt.Color defaultValue)
Set the default value.
|
void |
setName(java.lang.String name)
Set the name.
|
void |
setSource(java.lang.String source)
Set the source.
|
void |
setValue(java.awt.Color value)
Set the color value.
|
java.lang.String |
toString() |
private java.lang.String category
private java.lang.String source
private java.lang.String name
private java.awt.Color value
private java.awt.Color defaultValue
public ColorInfo()
ColorInfo.public ColorInfo(java.lang.String category, java.lang.String source, java.lang.String name, java.awt.Color value, java.awt.Color defaultValue)
ColorInfo.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 nullNamedColorPropertypublic java.lang.String getCategory()
public java.lang.String getSource()
public java.lang.String getName()
public java.awt.Color getValue()
public java.awt.Color getDefaultValue()
public void setCategory(java.lang.String category)
category - the categorypublic void setSource(java.lang.String source)
source - the sourcepublic void setName(java.lang.String name)
name - the namepublic void setValue(java.awt.Color value)
value - the valuepublic void setDefaultValue(java.awt.Color defaultValue)
defaultValue - the default valuepublic static ColorInfo fromPref(java.util.List<java.lang.String> lst, boolean isDefault)
ColorInfo from raw preference value.lst - the listisDefault - if the list represents a default value or notColorInfo object or null in case of invalid inputpublic java.lang.String toString()
toString in class java.lang.Object