com.tensegrity.skeleton.commands
Class ToggleConnectModeCommand

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.GraphDocumentCommand
                  extended bycom.tensegrity.skeleton.commands.ToggleConnectModeCommand
All Implemented Interfaces:
Command, ToggleCommand

public class ToggleConnectModeCommand
extends GraphDocumentCommand
implements ToggleCommand

Toggles the modus so that you can create new visual edges by selecting two visual nodes. If not selected, the mouse works as selection tool.

Version:
$Id: ToggleConnectModeCommand.java,v 1.17 2006/01/30 11:56:45 BurkhardWick Exp $
Author:
MichaelKegel, Gilles Iachelini, Stepan RUtz

Constructor Summary
ToggleConnectModeCommand(ApplicationFrame appFrame, java.lang.String command)
          Creates a new ToggleConnectModeCommand based on the given command id and ApplicationFrame context.
 
Method Summary
 boolean isActive()
          Returns true if the view is in Edge Creation Mode.
 boolean isEnabled()
          Returns true if this command is enabled.
 void perform(java.lang.Object args)
          This method will specify the functionality the command offers.
protected  void revalidateCancelable()
          Register/unregister as cancelable
 
Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentCommand
getGraphDocument, getVisualGraphView
 
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, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tensegrity.generic.command.Command
getDescription, getId, getPerformDescription, setEnabled
 

Constructor Detail

ToggleConnectModeCommand

public ToggleConnectModeCommand(ApplicationFrame appFrame,
                                java.lang.String command)
Creates a new ToggleConnectModeCommand based on the given command id and ApplicationFrame context.

Parameters:
appFrame - the ApplicationFrame context.
command - the command id.
Method Detail

perform

public void perform(java.lang.Object args)
Description copied from interface: Command
This method will specify the functionality the command offers. Optionally a parameter can be specified.

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

revalidateCancelable

protected void revalidateCancelable()
Register/unregister as cancelable


isActive

public boolean isActive()
Returns true if the view is in Edge Creation Mode.

Specified by:
isActive in interface ToggleCommand
Returns:
true if the view is in Edge Creation Mode.

isEnabled

public boolean isEnabled()
Description copied from interface: Command
Returns true if this command is enabled.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class GraphDocumentCommand


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