|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
ptolemy.vergil.toolbox.FigureAction
ptolemy.vergil.toolbox.MoveAction
public class MoveAction
An action to move an object up or down in its list. This can be used, for example, to move icon elements towards the foreground or to control the order in which attributes or ports appear.
Red (johnr) |
Yellow (eal) |
Nested Class Summary | |
---|---|
private static class |
MoveAction.MoveType
For a type-safe enumeration. |
Nested classes/interfaces inherited from class ptolemy.vergil.toolbox.FigureAction |
---|
FigureAction.SourceType |
Field Summary | |
---|---|
private MoveAction.MoveType |
_type
The type of move. |
static MoveAction.MoveType |
DOWN
Indicator for move down. |
static MoveAction.MoveType |
TO_FIRST
Indicator for move to first. |
static MoveAction.MoveType |
TO_LAST
Indicator for move to last. |
static MoveAction.MoveType |
UP
Indicator for move up. |
Fields inherited from class ptolemy.vergil.toolbox.FigureAction |
---|
CANVAS_TYPE, CONTEXTMENU_TYPE, HOTKEY_TYPE, MENUBAR_TYPE, PASTE_OFFSET, TOOLBAR_TYPE |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
MoveAction(java.lang.String description,
MoveAction.MoveType type)
Construct a new action. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Perform the move action and register the undo action. |
static void |
move(java.util.List targets,
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. |
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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MoveAction.MoveType DOWN
public static final MoveAction.MoveType TO_FIRST
public static final MoveAction.MoveType TO_LAST
public static final MoveAction.MoveType UP
private MoveAction.MoveType _type
Constructor Detail |
---|
public MoveAction(java.lang.String description, MoveAction.MoveType type)
description
- A description.type
- Indicator of the type of move.Method Detail |
---|
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, 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |