com.tensegrity.skeleton.commands
Class AbstractAlignVerticalCommand

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.EditGraphDocumentCommand
                      extended bycom.tensegrity.skeleton.commands.GraphDocumentSelectionCommand
                          extended bycom.tensegrity.skeleton.commands.AbstractAlignCommand
                              extended bycom.tensegrity.skeleton.commands.AbstractAlignVerticalCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AlignVerticalBottomCommand, AlignVerticalCenterCommand, AlignVerticalTopCommand

public abstract class AbstractAlignVerticalCommand
extends AbstractAlignCommand

Abstract base class for vertical align commands which provides the basic functionality for sorting the elements, etc. The subclass only has to set the bounds of each node according to the given information.

Version:
$Id: AbstractAlignVerticalCommand.java,v 1.6 2005/03/10 11:05:26 MichaelKegel Exp $
Author:
BurkhardWick

Constructor Summary
AbstractAlignVerticalCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Constructor.
 
Method Summary
 void alignElements(VisualGraphObject refElement, java.util.List elements)
          Aligns the elements vertically.
protected abstract  void setBounds(Boundary ref, Boundary b)
          Abstract definition of the function that will set the new bounding box depending on the given reference.
 
Methods inherited from class com.tensegrity.skeleton.commands.AbstractAlignCommand
getMinimumNodeDistance, getSelection, isEnabled, perform, setMinimumNodeDistance
 
Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentSelectionCommand
hasSelection
 
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

AbstractAlignVerticalCommand

public AbstractAlignVerticalCommand(ApplicationFrame applicationFrame,
                                    java.lang.String command)
Constructor.

Parameters:
applicationFrame - The application frame
command - The id of this align command
Method Detail

alignElements

public final void alignElements(VisualGraphObject refElement,
                                java.util.List elements)
Aligns the elements vertically.

Specified by:
alignElements in class AbstractAlignCommand
Parameters:
refElement - The reference element which vertical position will not change
elements - The elements to arrange

setBounds

protected abstract void setBounds(Boundary ref,
                                  Boundary b)
Abstract definition of the function that will set the new bounding box depending on the given reference.

Parameters:
ref - The reference boundary
b - The boundary to set


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