Class EditorColorChooserAction
java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.draw.action.AbstractSelectedAction
org.opentcs.thirdparty.jhotdraw.application.action.draw.AttributeAction
org.opentcs.thirdparty.jhotdraw.application.action.draw.EditorColorChooserAction
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,org.jhotdraw.app.Disposable
public class EditorColorChooserAction extends AttributeAction
EditorColorChooserAction.
The behavior for choosing the initial color of
the JColorChooser matches with
EditorColorIcon.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected org.jhotdraw.draw.AttributeKey<java.awt.Color>keyFields inherited from class org.opentcs.thirdparty.jhotdraw.application.action.draw.AttributeAction
attributes -
Constructor Summary
Constructors Constructor Description EditorColorChooserAction(org.jhotdraw.draw.DrawingEditor editor, org.jhotdraw.draw.AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon, java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> fixedAttributes)Creates a new instance. -
Method Summary
Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)protected java.awt.ColorgetInitialColor()voidselectionChanged(org.jhotdraw.draw.event.FigureSelectionEvent evt)Methods inherited from class org.opentcs.thirdparty.jhotdraw.application.action.draw.AttributeAction
applyAttributesTo, updateEnabledStateMethods inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledStateMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
key
protected org.jhotdraw.draw.AttributeKey<java.awt.Color> key
-
-
Constructor Details
-
EditorColorChooserAction
public EditorColorChooserAction(org.jhotdraw.draw.DrawingEditor editor, org.jhotdraw.draw.AttributeKey<java.awt.Color> key, java.lang.String name, javax.swing.Icon icon, java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> fixedAttributes)Creates a new instance.- Parameters:
editor- The drawing editorkey- The attribute keyname- The nameicon- The iconfixedAttributes- The fixed attributes
-
-
Method Details
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classAttributeAction
-
selectionChanged
public void selectionChanged(org.jhotdraw.draw.event.FigureSelectionEvent evt) -
getInitialColor
protected java.awt.Color getInitialColor()
-