Class AttributeAction
java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.draw.action.AbstractSelectedAction
org.opentcs.thirdparty.jhotdraw.application.action.draw.AttributeAction
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,org.jhotdraw.app.Disposable
- Direct Known Subclasses:
EditorColorChooserAction
public class AttributeAction
extends org.jhotdraw.draw.action.AbstractSelectedAction
Applies attribute values on the selected figures of the current
DrawingView of a
DrawingEditor.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object>attributes -
Constructor Summary
Constructors Constructor Description AttributeAction(org.jhotdraw.draw.DrawingEditor editor, java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> attributes, java.lang.String name, javax.swing.Icon icon)AttributeAction(org.jhotdraw.draw.DrawingEditor editor, org.jhotdraw.draw.AttributeKey key, java.lang.Object value, java.lang.String name, javax.swing.Icon icon) -
Method Summary
Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent evt)voidapplyAttributesTo(java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> a, java.util.Set<org.jhotdraw.draw.Figure> figures)Applies the specified attributes to the currently selected figures of the drawing.protected voidupdateEnabledState()Methods 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
-
attributes
protected java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> attributes
-
-
Constructor Details
-
AttributeAction
public AttributeAction(org.jhotdraw.draw.DrawingEditor editor, org.jhotdraw.draw.AttributeKey key, java.lang.Object value, java.lang.String name, javax.swing.Icon icon) -
AttributeAction
public AttributeAction(org.jhotdraw.draw.DrawingEditor editor, java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> attributes, java.lang.String name, javax.swing.Icon icon)
-
-
Method Details
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt) -
applyAttributesTo
public void applyAttributesTo(java.util.Map<org.jhotdraw.draw.AttributeKey,java.lang.Object> a, java.util.Set<org.jhotdraw.draw.Figure> figures)Applies the specified attributes to the currently selected figures of the drawing.- Parameters:
a- The attributes.figures- The figures to which the attributes are applied.
-
updateEnabledState
protected void updateEnabledState()- Overrides:
updateEnabledStatein classorg.jhotdraw.draw.action.AbstractSelectedAction
-