public class DrawingColorChooserAction extends EditorColorChooserAction
The behavior for choosing the initial color of the JColorChooser matches with
DrawingColorIcon.
colorChooser, keyattributes| Constructor and Description |
|---|
DrawingColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key)
Creates a new instance.
|
DrawingColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
javax.swing.Icon icon)
Creates a new instance.
|
DrawingColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name)
Creates a new instance.
|
DrawingColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name,
javax.swing.Icon icon) |
DrawingColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name,
javax.swing.Icon icon,
java.util.Map<AttributeKey,java.lang.Object> fixedAttributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected java.awt.Color |
getInitialColor() |
protected void |
updateEnabledState()
Updates the enabled state of this action to reflect the enabled state
of the active
DrawingView. |
selectionChangedapplyAttributesTodispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledStatepublic DrawingColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key)
public DrawingColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, javax.swing.Icon icon)
public DrawingColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name)
public DrawingColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon)
public DrawingColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon, java.util.Map<AttributeKey,java.lang.Object> fixedAttributes)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class EditorColorChooserActionprotected java.awt.Color getInitialColor()
getInitialColor in class EditorColorChooserActionprotected void updateEnabledState()
AbstractSelectedActionDrawingView. If no drawing view is active, this
action is disabled.updateEnabledState in class AttributeAction