com.tensegrity.skeleton.swt.commands
Class SwtZoomCommand

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.swt.commands.SwtZoomGraphDocumentCommand
                      extended bycom.tensegrity.skeleton.swt.commands.SwtZoomCommand
All Implemented Interfaces:
Command

public class SwtZoomCommand
extends SwtZoomGraphDocumentCommand

The SwtZoomCommand allows creating Commands which change the Zoom value with a constant value. If you need to change the zoom in steps of +10 for example you create a SwtZoomCommand with the value 10. Each time the perform is invoked, the change of the zoom value is applied.

Version:
$Id: SwtZoomCommand.java,v 1.3 2004/09/16 10:03:04 SebastienGuyon Exp $
Author:
S�bastien Guyon

Field Summary
 
Fields inherited from class com.tensegrity.skeleton.swt.commands.SwtZoomGraphDocumentCommand
dontUpdate, MAXIMUM_ZOOM_LIMIT, MINIMUM_ZOOM_LIMIT, value, ZOOM_INSETS
 
Constructor Summary
SwtZoomCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Creates the SwtZoomCommand which zoom the graph to fit into the visible area.
SwtZoomCommand(ApplicationFrame applicationFrame, java.lang.String command, int value)
          Creates a new SwtZoomCommand which will zoom the current document to the specified parameter value.
 
Method Summary
 boolean isEnabled()
          (non-Javadoc) This method returns true if the currently active Document is an instance of GraphDocument.
 void perform(java.lang.Object args)
          Updates the StatusBar with this commands title string.
 
Methods inherited from class com.tensegrity.skeleton.swt.commands.SwtZoomGraphDocumentCommand
getZoom, setZoom, setZoomToFit
 
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
 

Constructor Detail

SwtZoomCommand

public SwtZoomCommand(ApplicationFrame applicationFrame,
                      java.lang.String command,
                      int value)
Creates a new SwtZoomCommand which will zoom the current document to the specified parameter value.

Parameters:
applicationFrame - Application context for this command.
command - the ID of this command.
value - value to zoom to.

SwtZoomCommand

public SwtZoomCommand(ApplicationFrame applicationFrame,
                      java.lang.String command)
Creates the SwtZoomCommand which zoom the graph to fit into the visible area.

Parameters:
applicationFrame - Application context for this command.
command - the ID of this command.
Method Detail

perform

public void perform(java.lang.Object args)
Description copied from class: CommonBaseCommand
Updates the StatusBar with this commands title string. (non-Javadoc)

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

isEnabled

public boolean isEnabled()
Description copied from class: GraphDocumentCommand
(non-Javadoc) This method returns true if the currently active Document is an instance of GraphDocument.

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.