com.tensegrity.skeleton.commands
Class ZoomGraphDocumentCommand

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.ZoomGraphDocumentCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
ToggleZoomRectangleModeCommand, ZoomCommand, ZoomDialogCommand, ZoomGraphCommand, ZoomToSelectionCommand

public abstract class ZoomGraphDocumentCommand
extends GraphDocumentCommand

This Command provides methods for retrieving the current zoom value and setting it. Moreover, it contains a ZoomComboBox. Such a ComboBox can be used to ease the setting of a zoom value. Command classes that deal with zooming usually derive from this class.

Version:
$Id: ZoomGraphDocumentCommand.java,v 1.38 2005/04/14 15:23:03 KevinCVS Exp $
Author:
GillesIachelini

Field Summary
protected  int value
          the zoom value this command zooms the active graph to.
static Boundary ZOOM_INSETS
          Insets to use for zoom to fit
 
Constructor Summary
ZoomGraphDocumentCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Constructor for the ZoomGraphDocumentCommand.
 
Method Summary
protected  double getZoom()
          returns the current zoom value of the graph.
 void setZoom(double zoomvalue)
          sets the zoom value of the graph view.
protected  void setZoomToFit()
          sets the zoom value of the graph view to fit all existing items.
 
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, perform
 
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
 

Field Detail

ZOOM_INSETS

public static final Boundary ZOOM_INSETS
Insets to use for zoom to fit


value

protected int value
the zoom value this command zooms the active graph to.

Constructor Detail

ZoomGraphDocumentCommand

public ZoomGraphDocumentCommand(ApplicationFrame applicationFrame,
                                java.lang.String command)
Constructor for the ZoomGraphDocumentCommand.

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

getZoom

protected double getZoom()
returns the current zoom value of the graph.

Returns:
double

setZoom

public void setZoom(double zoomvalue)
sets the zoom value of the graph view.

Parameters:
zoomvalue - the value to set the zoom to.

setZoomToFit

protected void setZoomToFit()
sets the zoom value of the graph view to fit all existing items.



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