org.jhotdraw.draw.action
Class AttributeToggler<T>
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jhotdraw.draw.action.AttributeToggler<T>
-
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class AttributeToggler<T> extends javax.swing.AbstractActionAttributeToggler toggles an attribute of the selected figures between two different values. If the name of a compatible JTextComponent action is specified, the toggler checks if the current permant focus owner is a JTextComponent, and if it is, it will apply the text action to the JTextComponent.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AttributeToggler(DrawingEditor editor, AttributeKey<T> key, T value1, T value2)Creates a new instance.AttributeToggler(DrawingEditor editor, AttributeKey<T> key, T value1, T value2, javax.swing.Action compatibleTextAction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidactionPerformed(java.awt.event.ActionEvent evt)DrawingEditorgetEditor()DrawingViewgetView()
-
-
-
Constructor Detail
-
AttributeToggler
public AttributeToggler(DrawingEditor editor, AttributeKey<T> key, T value1, T value2)
Creates a new instance.
-
AttributeToggler
public AttributeToggler(DrawingEditor editor, AttributeKey<T> key, T value1, T value2, @Nullable javax.swing.Action compatibleTextAction)
-
-
Method Detail
-
getView
public DrawingView getView()
-
getEditor
public DrawingEditor getEditor()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG