org.jhotdraw.draw.action
Class EditorColorChooserAction
java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.draw.action.AbstractSelectedAction
org.jhotdraw.draw.action.AttributeAction
org.jhotdraw.draw.action.EditorColorChooserAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Disposable
- Direct Known Subclasses:
- DrawingColorChooserAction, SelectionColorChooserAction
public class EditorColorChooserAction
- extends AttributeAction
EditorColorChooserAction.
The behavior for choosing the initial color of the JColorChooser matches with
EditorColorIcon
.
- Version:
- $Id: EditorColorChooserAction.java 717 2010-11-21 12:30:57Z rawcoder $
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key)
Creates a new instance. |
EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
javax.swing.Icon icon)
Creates a new instance. |
EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name)
Creates a new instance. |
EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name,
javax.swing.Icon icon)
|
EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
java.lang.String name,
javax.swing.Icon icon,
java.util.Map<AttributeKey,java.lang.Object> fixedAttributes)
|
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
protected AttributeKey<java.awt.Color> key
colorChooser
protected static javax.swing.JColorChooser colorChooser
EditorColorChooserAction
public EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key)
- Creates a new instance.
EditorColorChooserAction
public EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
@Nullable
javax.swing.Icon icon)
- Creates a new instance.
EditorColorChooserAction
public EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
@Nullable
java.lang.String name)
- Creates a new instance.
EditorColorChooserAction
public EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
@Nullable
java.lang.String name,
@Nullable
javax.swing.Icon icon)
EditorColorChooserAction
public EditorColorChooserAction(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
@Nullable
java.lang.String name,
@Nullable
javax.swing.Icon icon,
@Nullable
java.util.Map<AttributeKey,java.lang.Object> fixedAttributes)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Overrides:
actionPerformed
in class AttributeAction
selectionChanged
public void selectionChanged(FigureSelectionEvent evt)
getInitialColor
protected java.awt.Color getInitialColor()