public class SwingColorProperty extends AbstractBasicSimpleEditableChangeableItem implements Property<java.awt.Color>
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoSave
Save values automatically?
|
protected java.awt.Color |
value
The color.
|
Constructor and Description |
---|
SwingColorProperty(java.lang.String basicName,
java.lang.String baseTag,
boolean autoSave,
java.awt.Color defaultValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JMenuItem |
createMenuItem(java.lang.String tag,
java.awt.Color color,
java.util.Locale l)
Create a menu entry which allows to switch to a given color.
|
EditorProvider |
getEditorProvider(java.util.Locale l)
Get the editor components for editing this preference property.
|
java.awt.Color |
getValue()
Get the color value,.
|
void |
setValue(java.awt.Color value)
Set the color value.
|
getBaseTag, getLabelString, getMenuString, getName, getString
addValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeakly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeakly
getName
protected final boolean autoSave
protected java.awt.Color value
public SwingColorProperty(@NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, boolean autoSave, @NotNull java.awt.Color defaultValue)
basicName
- basic property namebaseTag
- basic I18n tagautoSave
- do auto save?defaultValue
- default value@NotNull public EditorProvider getEditorProvider(@Nullable java.util.Locale l)
getEditorProvider
in interface EditableProperty
l
- locale used for i18npublic java.awt.Color getValue()
public void setValue(java.awt.Color value)
public javax.swing.JMenuItem createMenuItem(@NotNull java.lang.String tag, @NotNull java.awt.Color color, @Nullable java.util.Locale l)
tag
- i18n tag to use for switching to colorcolor
- color to switch tol
- locale to use