uci.gef
Class CmdAlign

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

public class CmdAlign
extends Cmd

An Cmd to align 2 or more objects relative to each other.

See Also:
Serialized Form

Field Summary
static int ALIGN_BOTTOMS
           
static int ALIGN_CENTERS
           
static int ALIGN_H_CENTERS
           
static int ALIGN_LEFTS
           
static int ALIGN_RIGHTS
           
static int ALIGN_TO_GRID
           
static int ALIGN_TOPS
          Constants specifying the type of alignment requested.
static int ALIGN_V_CENTERS
           
protected  int direction
          Specification of the type of alignment requested
 
Fields inherited from class uci.gef.Cmd
_args, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
CmdAlign(int dir)
          Construct a new CmdAlign.
 
Method Summary
 void doIt()
           
 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

ALIGN_TOPS

public static final int ALIGN_TOPS
Constants specifying the type of alignment requested.

ALIGN_BOTTOMS

public static final int ALIGN_BOTTOMS

ALIGN_LEFTS

public static final int ALIGN_LEFTS

ALIGN_RIGHTS

public static final int ALIGN_RIGHTS

ALIGN_CENTERS

public static final int ALIGN_CENTERS

ALIGN_H_CENTERS

public static final int ALIGN_H_CENTERS

ALIGN_V_CENTERS

public static final int ALIGN_V_CENTERS

ALIGN_TO_GRID

public static final int ALIGN_TO_GRID

direction

protected int direction
Specification of the type of alignment requested
Constructor Detail

CmdAlign

public CmdAlign(int dir)
Construct a new CmdAlign.
Parameters:
dir - The desired alignment direction, one of the constants listed above.
Method Detail

wordFor

protected static String wordFor(int d)

doIt

public void doIt()
Overrides:
doIt in class Cmd

undoIt

public void undoIt()
Overrides:
undoIt in class Cmd