com.tensegrity.skeleton.commands
Class CancelCommand

java.lang.Object
  extended bycom.tensegrity.generic.command.BaseCommand
      extended bycom.tensegrity.skeleton.commands.CommonBaseCommand
          extended bycom.tensegrity.skeleton.commands.DocumentCommand
              extended bycom.tensegrity.skeleton.commands.CancelCommand
All Implemented Interfaces:
Command

public final class CancelCommand
extends DocumentCommand

Used to leave a mode which was usually entered by a toggle command. Toggle commands should register themselves as a CancelCommand with an object of this class.

To be reachable in all projects, the CancelCommand is always registered by GUIItem.COMMAND_CANCEL.

Version:
$Id: CancelCommand.java,v 1.4 2005/04/13 12:47:49 KevinCVS Exp $
Author:
BurkhardWick

Constructor Summary
CancelCommand(ApplicationFrame applicationFrame)
          Constructor
 
Method Summary
 void addCancelable(Command cancelable)
          Adds the command as cancelable.
 void perform(java.lang.Object args)
          Calls the last registered cancelable command.
 void removeCancelable(Command cancelable)
          Removes one instance of the previously added cancelable command.
 
Methods inherited from class com.tensegrity.skeleton.commands.DocumentCommand
getDocument, getGraphApplication, newGraphDocumentFromFactory
 
Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand
getApplicationFrame, getTitle
 
Methods inherited from class com.tensegrity.generic.command.BaseCommand
getDescription, getId, getPerformDescription, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CancelCommand

public CancelCommand(ApplicationFrame applicationFrame)
Constructor

Parameters:
applicationFrame - The applicationframe used to pass to the super constructor
Method Detail

perform

public void perform(java.lang.Object args)
Calls the last registered cancelable command.

Specified by:
perform in interface Command
Overrides:
perform in class CommonBaseCommand
Parameters:
args - Ignored
See Also:
Command.perform(java.lang.Object)

addCancelable

public void addCancelable(Command cancelable)
Adds the command as cancelable. This command will be performed, if the CancelCommand is activated (usually by pressing ESCAPE)

Parameters:
cancelable - The command to add

removeCancelable

public void removeCancelable(Command cancelable)
Removes one instance of the previously added cancelable command.

Parameters:
cancelable - The command to remove


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.