public class DrawingColorChooserAction extends EditorColorChooserAction
The behavior for choosing the initial color of the JColorChooser matches with
DrawingColorIcon
.
colorChooser, key
attributes
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 . |
selectionChanged
applyAttributesTo
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState
public 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.ActionListener
actionPerformed
in class EditorColorChooserAction
protected java.awt.Color getInitialColor()
getInitialColor
in class EditorColorChooserAction
protected void updateEnabledState()
AbstractSelectedAction
DrawingView
. If no drawing view is active, this
action is disabled.updateEnabledState
in class AttributeAction