Package ptolemy.vergil.toolbox
Class RotateOrFlipPorts
- java.lang.Object
-
- javax.swing.AbstractAction
-
- ptolemy.vergil.toolbox.FigureAction
-
- ptolemy.vergil.toolbox.RotateOrFlipPorts
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class RotateOrFlipPorts extends FigureAction
Action to rotate or flip ports. What exactly gets done depends on the constructor arguments.- Since:
- Ptolemy II 5.2
- Version:
- $Id$
- Author:
- Edward A. Lee
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red (johnr)
- Pt.ProposedRating:
- Red (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.vergil.toolbox.FigureAction
FigureAction.SourceType
-
-
Field Summary
Fields Modifier and Type Field Description static intCLOCKWISEIndicator to rotate clockwise.static intCOUNTERCLOCKWISEIndicator to rotate counterclockwise.static intFLIP_HORIZONTALIndicator to flip ports horizontally.static intFLIP_VERTICALIndicator to flip ports vertically.-
Fields inherited from class ptolemy.vergil.toolbox.FigureAction
CANVAS_TYPE, CONTEXTMENU_TYPE, HOTKEY_TYPE, MENUBAR_TYPE, PASTE_OFFSET, TOOLBAR_TYPE
-
-
Constructor Summary
Constructors Constructor Description RotateOrFlipPorts(int direction, java.lang.String label)Create an action to rotate the ports.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Process the rotate command.-
Methods inherited from class ptolemy.vergil.toolbox.FigureAction
getFigure, getFrame, getSourceType, getTarget, getX, getY, offsetFigure
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
CLOCKWISE
public static final int CLOCKWISE
Indicator to rotate clockwise.- See Also:
- Constant Field Values
-
COUNTERCLOCKWISE
public static final int COUNTERCLOCKWISE
Indicator to rotate counterclockwise.- See Also:
- Constant Field Values
-
FLIP_HORIZONTAL
public static final int FLIP_HORIZONTAL
Indicator to flip ports horizontally.- See Also:
- Constant Field Values
-
FLIP_VERTICAL
public static final int FLIP_VERTICAL
Indicator to flip ports vertically.- See Also:
- Constant Field Values
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Process the rotate command.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classFigureAction- Parameters:
event- The event.
-
-