org.jhotdraw.draw.action
Class SelectionColorChooserHandler
java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.draw.action.AbstractSelectedAction
org.jhotdraw.draw.action.SelectionColorChooserHandler
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, javax.swing.event.ChangeListener, Disposable
public class SelectionColorChooserHandler
- extends AbstractSelectedAction
- implements javax.swing.event.ChangeListener
SelectionColorChooserHandler.
- Version:
- $Id$
- 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 |
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 javax.swing.JColorChooser colorChooser
popupMenu
protected javax.swing.JPopupMenu popupMenu
isUpdating
protected int isUpdating
SelectionColorChooserHandler
public SelectionColorChooserHandler(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
javax.swing.JColorChooser colorChooser,
javax.swing.JPopupMenu popupMenu)
- Creates a new instance.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
applySelectedColorToFigures
protected void applySelectedColorToFigures()
updateEnabledState
protected void updateEnabledState()
- Description copied from class:
AbstractSelectedAction
- Updates the enabled state of this action to reflect the enabled state
of the active
DrawingView
. If no drawing view is active, this
action is disabled.
- Overrides:
updateEnabledState
in class AbstractSelectedAction
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interface javax.swing.event.ChangeListener