com.tensegrity.skeleton.commands
Class AbstractLayoutCommand

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.AbstractLayoutCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
LayoutCommand, SwtLayoutCommand

public abstract class AbstractLayoutCommand
extends EditGraphDocumentCommand


Constructor Summary
AbstractLayoutCommand(ApplicationFrame applicationFrame, java.lang.String command, java.lang.String layoutContext)
           
AbstractLayoutCommand(ApplicationFrame applicationFrame, java.lang.String command, java.lang.String layoutContext, boolean isNodeLayout)
           
 
Method Summary
protected abstract  Observer buildLayoutObserver()
           
protected abstract  LayoutController getDefaultLayoutController()
           Returns the default LayoutController.
 java.lang.String getLayoutName()
          Returns the layoutName.
protected abstract  AttributeSet getRendererConfigurationLowDetail()
           
 java.lang.String getTitle()
          If the internal id is not null, this method returns a String holding the id from UIManager, otherwise the perform description of the superclass is returned.
 boolean isEnabled()
          Returns true if the active and editable grap document is enabled and the layout context is valid for the document layout controller.
 boolean isNodeLayout()
          Indicates whether the layout command associates with a node or an edge layout engine.
 void perform(java.lang.Object args)
          Updates the StatusBar with this commands title string.
protected  void performLayout()
           
 void setLayoutName(java.lang.String newName)
          Sets the layoutName
protected abstract  void showError(LayoutController layoutController)
           
 
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
 
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

AbstractLayoutCommand

public AbstractLayoutCommand(ApplicationFrame applicationFrame,
                             java.lang.String command,
                             java.lang.String layoutContext)

AbstractLayoutCommand

public AbstractLayoutCommand(ApplicationFrame applicationFrame,
                             java.lang.String command,
                             java.lang.String layoutContext,
                             boolean isNodeLayout)
Method Detail

perform

public final 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:
Command.perform(java.lang.Object)

performLayout

protected void performLayout()

getLayoutName

public final java.lang.String getLayoutName()
Returns the layoutName.

Returns:
Returns the layoutName.

setLayoutName

public final void setLayoutName(java.lang.String newName)
Sets the layoutName

Parameters:
newName - the layout name

getTitle

public final java.lang.String getTitle()
Description copied from class: CommonBaseCommand
If the internal id is not null, this method returns a String holding the id from UIManager, otherwise the perform description of the superclass is returned.

Overrides:
getTitle in class CommonBaseCommand
Returns:
the unique id of this command.
See Also:
BaseCommand.getPerformDescription()

isNodeLayout

public final boolean isNodeLayout()
Indicates whether the layout command associates with a node or an edge layout engine.

Returns:
Returns true if the layout command associates with a node layout engine.

isEnabled

public final boolean isEnabled()
Returns true if the active and editable grap document is enabled and the layout context is valid for the document layout controller.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class EditGraphDocumentCommand
Returns:
true if the active and editable grap document is enabled and the layout context is valid for the document layout controller.
See Also:
EditGraphDocumentCommand.isEnabled(), getDefaultLayoutController(), LayoutController.isValidLayoutContext(String)

buildLayoutObserver

protected abstract Observer buildLayoutObserver()

showError

protected abstract void showError(LayoutController layoutController)

getRendererConfigurationLowDetail

protected abstract AttributeSet getRendererConfigurationLowDetail()

getDefaultLayoutController

protected abstract LayoutController getDefaultLayoutController()

Returns the default LayoutController.

Returns:
the default LayoutController.


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