org.argouml.kernel
Class AbstractCommand

java.lang.Object
  extended by org.argouml.kernel.AbstractCommand
All Implemented Interfaces:
Command

public abstract class AbstractCommand
extends java.lang.Object
implements Command

The base class for any commands that can be undone by ActionUndo.


Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  java.lang.Object execute()
          Execute the command to redo an instruction.
 boolean isRedoable()
          Returns true if the command can be redone once undone
 boolean isUndoable()
          Returns true if the command can be undone.
abstract  void undo()
          Perform undo an an undoable command that is in an undoable state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

execute

public abstract java.lang.Object execute()
Description copied from interface: Command
Execute the command to redo an instruction.

Specified by:
execute in interface Command
Returns:
any result object created by the command

undo

public abstract void undo()
Description copied from interface: Command
Perform undo an an undoable command that is in an undoable state

Specified by:
undo in interface Command

isUndoable

public boolean isUndoable()
Description copied from interface: Command
Returns true if the command can be undone.

Specified by:
isUndoable in interface Command
Returns:
true if the command is undoable

isRedoable

public boolean isRedoable()
Description copied from interface: Command
Returns true if the command can be redone once undone

Specified by:
isRedoable in interface Command
Returns:
true if the command is redoable


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook