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  

    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

    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
    void actionPerformed​(java.awt.event.ActionEvent evt)  
    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.
    protected void 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

    Methods inherited from interface javax.swing.Action

    accept
  • 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:
      updateEnabledState in class org.jhotdraw.draw.action.AbstractSelectedAction