org.jhotdraw.draw.action
Class SelectionColorChooserAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.draw.action.AbstractSelectedAction
          extended by org.jhotdraw.draw.action.AttributeAction
              extended by org.jhotdraw.draw.action.EditorColorChooserAction
                  extended by org.jhotdraw.draw.action.SelectionColorChooserAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Disposable

public class SelectionColorChooserAction
extends EditorColorChooserAction

This is like EditorColorChooserAction, but the JColorChooser is initialized with the color of the currently selected Figures.

The behavior for choosing the initial color of the JColorChooser matches with SelectionColorIcon.

Version:
$Id: SelectionColorChooserAction.java 564 2009-10-10 10:21:01Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.draw.action.EditorColorChooserAction
colorChooser, key
 
Fields inherited from class org.jhotdraw.draw.action.AttributeAction
attributes
 
Fields inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
labels
 
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
SelectionColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key)
          Creates a new instance.
SelectionColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, javax.swing.Icon icon)
          Creates a new instance.
SelectionColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name)
          Creates a new instance.
SelectionColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon)
           
SelectionColorChooserAction(DrawingEditor editor, AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon, java.util.Map<AttributeKey,java.lang.Object> fixedAttributes)
           
 
Method Summary
protected  java.awt.Color getInitialColor()
           
 
Methods inherited from class org.jhotdraw.draw.action.EditorColorChooserAction
actionPerformed, selectionChanged
 
Methods inherited from class org.jhotdraw.draw.action.AttributeAction
applyAttributesTo, updateEnabledState
 
Methods inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState
 
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
 

Constructor Detail

SelectionColorChooserAction

public SelectionColorChooserAction(DrawingEditor editor,
                                   AttributeKey<java.awt.Color> key)
Creates a new instance.


SelectionColorChooserAction

public SelectionColorChooserAction(DrawingEditor editor,
                                   AttributeKey<java.awt.Color> key,
                                   javax.swing.Icon icon)
Creates a new instance.


SelectionColorChooserAction

public SelectionColorChooserAction(DrawingEditor editor,
                                   AttributeKey<java.awt.Color> key,
                                   java.lang.String name)
Creates a new instance.


SelectionColorChooserAction

public SelectionColorChooserAction(DrawingEditor editor,
                                   AttributeKey<java.awt.Color> key,
                                   java.lang.String name,
                                   javax.swing.Icon icon)

SelectionColorChooserAction

public SelectionColorChooserAction(DrawingEditor editor,
                                   AttributeKey<java.awt.Color> key,
                                   java.lang.String name,
                                   javax.swing.Icon icon,
                                   java.util.Map<AttributeKey,java.lang.Object> fixedAttributes)
Method Detail

getInitialColor

protected java.awt.Color getInitialColor()
Overrides:
getInitialColor in class EditorColorChooserAction