CH.ifa.draw.standard
Class AlignCommand

java.lang.Object
  extended by CH.ifa.draw.util.Command
      extended by CH.ifa.draw.standard.AlignCommand

public class AlignCommand
extends Command

Align a selection of figures relative to each other.


Field Summary
static int BOTTOMS
          align bottoms
static int CENTERS
          align centers (horizontally)
static int LEFTS
          align left sides
static int MIDDLES
          align middles (vertically)
static int RIGHTS
          align right sides
static int TOPS
          align tops
 
Constructor Summary
AlignCommand(java.lang.String name, DrawingView view, int op)
          Constructs an alignment command.
 
Method Summary
 void execute()
          Executes the command.
 boolean isExecutable()
          Tests if the command can be executed.
 
Methods inherited from class CH.ifa.draw.util.Command
name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFTS

public static final int LEFTS
align left sides

See Also:
Constant Field Values

CENTERS

public static final int CENTERS
align centers (horizontally)

See Also:
Constant Field Values

RIGHTS

public static final int RIGHTS
align right sides

See Also:
Constant Field Values

TOPS

public static final int TOPS
align tops

See Also:
Constant Field Values

MIDDLES

public static final int MIDDLES
align middles (vertically)

See Also:
Constant Field Values

BOTTOMS

public static final int BOTTOMS
align bottoms

See Also:
Constant Field Values
Constructor Detail

AlignCommand

public AlignCommand(java.lang.String name,
                    DrawingView view,
                    int op)
Constructs an alignment command.

Parameters:
name - the command name
view - the target view
op - the alignment operation (LEFTS, CENTERS, RIGHTS, etc.)
Method Detail

isExecutable

public boolean isExecutable()
Description copied from class: Command
Tests if the command can be executed.

Overrides:
isExecutable in class Command

execute

public void execute()
Description copied from class: Command
Executes the command.

Specified by:
execute in class Command