uci.gef
Class CmdDistribute

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

public class CmdDistribute
extends Cmd

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

See Also:
Serialized Form

Field Summary
protected  Rectangle _bbox
           
protected  int _request
          Specification of the type of distribution requested
static int H_CENTERS
           
static int H_PACK
           
static int H_SPACING
          Constants specifying the type of distribution requested.
static int V_CENTERS
           
static int V_PACK
           
static int V_SPACING
           
 
Fields inherited from class uci.gef.Cmd
_args, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
CmdDistribute(int r)
          Construct a new CmdDistribute.
 
Method Summary
 void doIt()
           
 Rectangle getLastBBox()
           
protected  void swap(Vector v, int i, int j)
           
 void undoIt()
           
protected static String wordFor(int r)
           
 
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

H_SPACING

public static final int H_SPACING
Constants specifying the type of distribution requested.

H_CENTERS

public static final int H_CENTERS

H_PACK

public static final int H_PACK

V_SPACING

public static final int V_SPACING

V_CENTERS

public static final int V_CENTERS

V_PACK

public static final int V_PACK

_request

protected int _request
Specification of the type of distribution requested

_bbox

protected Rectangle _bbox
Constructor Detail

CmdDistribute

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

wordFor

protected static String wordFor(int r)

doIt

public void doIt()
Overrides:
doIt in class Cmd

undoIt

public void undoIt()
Overrides:
undoIt in class Cmd

swap

protected void swap(Vector v,
                    int i,
                    int j)

getLastBBox

public Rectangle getLastBBox()