org.tigris.gef.base
Class CmdSelectNear
java.lang.Object
javax.swing.AbstractAction
org.tigris.gef.base.Cmd
org.tigris.gef.base.CmdSelectNear
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class CmdSelectNear
- extends Cmd
Cmd to SelectNear Figs by a small distance. This is useful when you
want to get diagrams to look just right and you are not to steady
with the mouse. Also allows user to keep hands on keyboard.
- See Also:
- Serialized Form
Field Summary |
static int |
DOWN
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
UP
|
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 |
Method Summary |
void |
doIt()
Move the selected items a few pixels in the given
direction. |
void |
undoIt()
Undo the Cmd using information stored during its
execution. |
protected static java.lang.String |
wordFor(int d)
|
Methods inherited from class org.tigris.gef.base.Cmd |
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, getResource, register, registeredCmds, setArg, setName, setResource, shouldBeEnabled, updateEnabled |
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 |
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
UP
public static final int UP
- See Also:
- Constant Field Values
DOWN
public static final int DOWN
- See Also:
- Constant Field Values
CmdSelectNear
public CmdSelectNear(int dir)
CmdSelectNear
public CmdSelectNear(int dir,
int mag)
wordFor
protected static java.lang.String wordFor(int d)
doIt
public void doIt()
- Move the selected items a few pixels in the given
direction. Note that the sign convention is the opposite of
CmdScroll.
- Specified by:
doIt
in class Cmd
undoIt
public void undoIt()
- Description copied from class:
Cmd
- Undo the Cmd using information stored during its
execution.
TODO Abandon this. We need the memento pattern for undo
- Specified by:
undoIt
in class Cmd