uci.gef
Class CmdNudge

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--uci.gef.Cmd
              |
              +--uci.gef.CmdNudge

public class CmdNudge
extends Cmd

Cmd to Nudge 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:
Fig, Serialized Form

Field Summary
static int DOWN
           
static int LEFT
           
static int RIGHT
           
static int UP
           
 
Fields inherited from class uci.gef.Cmd
_args, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
CmdNudge(int dir)
           
CmdNudge(int dir, int mag)
           
 
Method Summary
 void doIt()
          Move the selected items a few pixels in the given direction.
 void undoIt()
           
protected static String wordFor(int d)
           
 
Methods inherited from class uci.gef.Cmd
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, register, registeredCmds, setArg, setName, shouldBeEnabled, updateEnabled
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT

public static final int LEFT

RIGHT

public static final int RIGHT

UP

public static final int UP

DOWN

public static final int DOWN
Constructor Detail

CmdNudge

public CmdNudge(int dir)

CmdNudge

public CmdNudge(int dir,
                int mag)
Method Detail

wordFor

protected static 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.
Overrides:
doIt in class Cmd

undoIt

public void undoIt()
Overrides:
undoIt in class Cmd