public class RotateOrFlipPorts extends FigureAction
Red (johnr) |
Red (eal) |
FigureAction.SourceType
Modifier and Type | Field and Description |
---|---|
static int |
CLOCKWISE
Indicator to rotate clockwise.
|
static int |
COUNTERCLOCKWISE
Indicator to rotate counterclockwise.
|
static int |
FLIP_HORIZONTAL
Indicator to flip ports horizontally.
|
static int |
FLIP_VERTICAL
Indicator to flip ports vertically.
|
CANVAS_TYPE, CONTEXTMENU_TYPE, HOTKEY_TYPE, MENUBAR_TYPE, PASTE_OFFSET, TOOLBAR_TYPE
Constructor and Description |
---|
RotateOrFlipPorts(int direction,
java.lang.String label)
Create an action to rotate the ports.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Process the rotate command.
|
getFigure, getFrame, getSourceType, getTarget, getX, getY, offsetFigure
public static final int CLOCKWISE
public static final int COUNTERCLOCKWISE
public static final int FLIP_HORIZONTAL
public static final int FLIP_VERTICAL
public RotateOrFlipPorts(int direction, java.lang.String label)
direction
- One of CLOCKWISE, COUNTERCLOCKWISE, FLIP_HORIZONTAL, or FLIP_VERTICAL.label
- The label to put in the menu.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class FigureAction
event
- The event.