com.tensegrity.skeleton.commands
Class ToggleAutomaticLayoutCommand

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.ToggleAutomaticLayoutCommand
All Implemented Interfaces:
Command, ToggleCommand

public class ToggleAutomaticLayoutCommand
extends GraphDocumentCommand
implements ToggleCommand

This command will toggle a flag in GraphFrame, which is used to configure whether layout is performed automatically or not.

Version:
$Id: ToggleAutomaticLayoutCommand.java,v 1.19 2006/03/14 14:55:02 MichaelKegel Exp $
Author:
Stepan RUtz

Constructor Summary
ToggleAutomaticLayoutCommand(ApplicationFrame appFrame, java.lang.String command)
          Constructor specifying the ApplicationFrame, and a name for this Command.
 
Method Summary
 boolean isActive()
          Returns true, if the toggle command is currently selected (activated).
 void perform(java.lang.Object args)
          This method will specify the functionality the command offers.
 void triggerLayout()
          Use this method, if you like to trigger the currently used Layout of the underlying document.
 
Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentCommand
getGraphDocument, getVisualGraphView, isEnabled
 
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, isEnabled, setEnabled
 

Constructor Detail

ToggleAutomaticLayoutCommand

public ToggleAutomaticLayoutCommand(ApplicationFrame appFrame,
                                    java.lang.String command)
Constructor specifying the ApplicationFrame, and a name for this Command.

Parameters:
appFrame - the ApplicationFrame.
command - a unique name for this Command.
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)

triggerLayout

public void triggerLayout()
Use this method, if you like to trigger the currently used Layout of the underlying document.
Note: This method checks whether the automatic layout command is active or not. If its not active, this call is ignored. Otherwise the LayoutController is fetched from the VisualGraphView and the LayoutController.applyDynamic() method is invoked. This method has only package access, because certain other commands may need to trigger when exiting editing-modes which had the layout turned off for a while.

See Also:
ToggleConnectModeCommand

isActive

public boolean isActive()
Description copied from interface: ToggleCommand
Returns true, if the toggle command is currently selected (activated).

Specified by:
isActive in interface ToggleCommand
Returns:
The status of the toggle command


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