CH.ifa.draw.util
Class Command

java.lang.Object
  extended by CH.ifa.draw.util.Command
Direct Known Subclasses:
AlignCommand, BringToFrontCommand, ChangeAttributeCommand, CopyCommand, CutCommand, DeleteCommand, DuplicateCommand, GroupCommand, InsertImageCommand, PasteCommand, SendToBackCommand, ToggleGridCommand, UngroupCommand

public abstract class Command
extends java.lang.Object

Commands encapsulate an action to be executed. Commands have a name and can be used in conjunction with Command enabled ui components.


Design Patterns

 o Command
Command is a simple instance of the command pattern without undo support.


See Also:
CommandButton, CommandMenu, CommandChoice

Constructor Summary
Command(java.lang.String name)
          Constructs a command with the given name.
 
Method Summary
abstract  void execute()
          Executes the command.
 boolean isExecutable()
          Tests if the command can be executed.
 java.lang.String name()
          Gets the command name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command(java.lang.String name)
Constructs a command with the given name.

Method Detail

execute

public abstract void execute()
Executes the command.


isExecutable

public boolean isExecutable()
Tests if the command can be executed.


name

public java.lang.String name()
Gets the command name.