public class MoveAction extends FigureAction
Red (johnr) |
Yellow (eal) |
FigureAction.SourceType
Modifier and Type | Field and Description |
---|---|
static ptolemy.vergil.toolbox.MoveAction.MoveType |
DOWN
Indicator for move down.
|
static ptolemy.vergil.toolbox.MoveAction.MoveType |
TO_FIRST
Indicator for move to first.
|
static ptolemy.vergil.toolbox.MoveAction.MoveType |
TO_LAST
Indicator for move to last.
|
static ptolemy.vergil.toolbox.MoveAction.MoveType |
UP
Indicator for move up.
|
CANVAS_TYPE, CONTEXTMENU_TYPE, HOTKEY_TYPE, MENUBAR_TYPE, PASTE_OFFSET, TOOLBAR_TYPE
Constructor and Description |
---|
MoveAction(java.lang.String description,
ptolemy.vergil.toolbox.MoveAction.MoveType type)
Construct a new action.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Perform the move action and register the undo action.
|
static void |
move(java.util.List targets,
ptolemy.vergil.toolbox.MoveAction.MoveType type,
NamedObj context)
Move the objects in the specified list up or down in the list
of similar objects in their container, as specified by the move type.
|
getFigure, getFrame, getSourceType, getTarget, getX, getY, offsetFigure
public static final ptolemy.vergil.toolbox.MoveAction.MoveType DOWN
public static final ptolemy.vergil.toolbox.MoveAction.MoveType TO_FIRST
public static final ptolemy.vergil.toolbox.MoveAction.MoveType TO_LAST
public static final ptolemy.vergil.toolbox.MoveAction.MoveType UP
public MoveAction(java.lang.String description, ptolemy.vergil.toolbox.MoveAction.MoveType type)
description
- A description.type
- Indicator of the type of move.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class FigureAction
event
- The event.public static void move(java.util.List targets, ptolemy.vergil.toolbox.MoveAction.MoveType type, NamedObj context)
targets
- The list of objects to move.type
- One of DOWN, TO_FIRST, TO_LAST, and UP.context
- The context.