com.tensegrity.graph.layout.controller
Class SwimlaneLayoutController

java.lang.Object
  extended bycom.tensegrity.graph.layout.controller.LayoutController
      extended bycom.tensegrity.graph.layout.controller.SwimlaneLayoutController
All Implemented Interfaces:
Attributable, AttributableOnSet

public class SwimlaneLayoutController
extends LayoutController

This class implements a layout controller for swimlane application.

Author:
Sharokh Khani

Field Summary
 
Fields inherited from class com.tensegrity.graph.layout.controller.LayoutController
ACTIVE, ACTIVE_EDGELAYOUT, ACTIVE_NODELAYOUT, animation, ANIMATION_TIME, animationDuration, ANIMATIONDURATION, ANIMATIONENABLED, ATTRIBUTENAME_EDGE_LAYOUT, ATTRIBUTENAME_GLOBAL_SETTINGS, ATTRIBUTENAME_LAYOUT_CONTEXT, ATTRIBUTENAME_LAYOUT_SETTING, ATTRIBUTENAME_NODE_LAYOUT, DEFAULTEDGELAYOUTCONTEXT, DEFAULTNODELAYOUTCONTEXT, DEPENDING_ON_LAYOUT_DIRECTION, DYNAMIC, DYNAMIC_PORT_REASSIGNMENT, dynamicEdgeLayout, DYNAMICEDGELAYOUT, dynamicNodeLayout, DYNAMICNODELAYOUT, EDGE_OPTIONS, edgeLayoutContext, ENABLE_ANIMATION, GLOBAL_CONFIGURATION, IGNORE_UNCONNECTED_NODES, INACTIVE, LAYOUT_DOMAIN, layoutDomain, LAYOUTDOMAIN_ALL, LAYOUTDOMAIN_CONSIDER_SELECTED_GROUPS, LAYOUTDOMAIN_SELECTION, LAYOUTDOMAIN_USED, LAYOUTDOMAIN_WHOLE, NODE_OPTIONS, nodeLayoutContext, observable, OTHER_OPTIONS, RELAYOUT_EDGES_ON_CHANGE, RELAYOUT_NODES_ON_CHANGE, SELECTED_GROUPS, state, strErrorMessage, visualGraphObjectContainer, visualGraphView, WHOLE_GRAPH
 
Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet
TREE_SUBSET_POSTFIX
 
Constructor Summary
SwimlaneLayoutController()
          Constructor for for SwimlaneLayoutController.
SwimlaneLayoutController(LayoutController layoutController, VisualGraphObjectContainer graphobjectcontainer)
          Copy-Constructor for for SwimlaneLayoutController.
 
Method Summary
 boolean apply()
          This method applies a layout on the visual nodes and edges of the associated VisualGraphObjectContainer which should, together with an appropriate edge layout context and node layout context, be set in advance.
 boolean applyDynamic()
          This method causes the LayoutController to perform a single dynamic layout.
 LayoutController deepCopy(VisualGraphObjectContainer visualgraphview)
          Override this method with a meaningful deep-copy operation that returns a new independent layout-controller associated with the given VisualGraphObjectContainer.
protected  void init()
          This method must be overwritten by derived LayoutControllers.
 void setVisualGraphObjectContainer(VisualGraphObjectContainer visualGraphObjectContainer)
          Sets the VisualGraphObjectContainer that is to be associated.
static void verifySwimLaneStructure(VisualGraphObjectContainer visualgraphview)
          Verifies the structure of the given VisualGraphObjectContainer.
 
Methods inherited from class com.tensegrity.graph.layout.controller.LayoutController
addAttributableOnSetListener, addErrorMessage, addLayoutContext, addObserver, addProgressListener, apply, apply, apply, apply, applyEdgeLayout, applyEdgeLayout, areAttributableEventsEnabled, considerCurrentEdgesRoute, deleteObserver, disableAttributableEvents, duplicateLayoutContext, enableAnimation, enableAttributableEvents, enableDynamicEdgeLayout, enableDynamicNodeLayout, error, getAnimateDuration, getAttribute, getAttributes, getAttributesTree, getAttributesTree, getAttributeType, getAttributeValue, getAutomaticPortReassignment, getAutomaticPortReassignmentDirectionDependent, getBaseLayoutEngine, getBaseLayouter, getConfiguration, getEdgeDefaultLayoutAttributes, getEdgeLayoutContext, getEdgeLayoutContextConstraint, getEdgeLayoutContextList, getEdgeLayouterList, getErrorMessage, getGraphPosition, getIgnoreIsolatedNodes, getLayoutAttribute, getLayoutAttributeSet, getLayoutContext, getLayoutContextList, getLayoutContextList, getLayoutDomain, getLayoutEdgesContextDepended, getLayoutReport, getLayoutService, getNodeDefaultLayoutAttributes, getNodeLayoutContext, getNodeLayoutContextConstraint, getNodeLayoutContextList, getNodeLayouterList, getPreviousEdgeLayoutAttributeMap, getPreviousEdgeLayoutContextMap, getPreviousNodeLayoutAttributeMap, getPreviousNodeLayoutContextMap, getState, getUsingLayoutContexts, getVisualGraphObjectContainer, isAnimationEnabled, isDynamicEdgeLayoutEnabled, isDynamicLayoutSupported, isDynamicNodeLayoutEnabled, isNodeLayoutContext, isRecursive, isValidLayoutContext, journalStartLayout, journalStopLayout, onBeginLayout, onBeginLoading, onBeginVisualSubgraphEdgeLayout, onBeginVisualSubgraphLayout, onEndLayout, onEndLoading, onEndVisualSubgraphEdgeLayout, onEndVisualSubgraphLayout, onLayoutEdgeSubgraph, onLayoutSubgraph, registerLayout, registerLayout, registerLayoutEngine, registerLayoutEngine, removeAttributableOnSetListener, removeLayoutContext, removeProgressListener, setAnimateDuration, setAttribute, setAttributes, setAttributesTree, setAttributesTree, setAttributeValue, setAutomaticPortReassignment, setAutomaticPortReassignmentDirectionDependent, setBorder, setChanged, setChanged, setConfiguration, setEdgeLayoutContext, setGraphPosition, setIgnoreIsolatedNodes, setLayoutAttribute, setLayoutAttributeSet, setLayoutContext, setLayoutDomain, setLayoutEdgesContextDepended, setLayoutService, setNodeLayoutContext, toString, updateLayoutAttributeSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwimlaneLayoutController

public SwimlaneLayoutController()
Constructor for for SwimlaneLayoutController.


SwimlaneLayoutController

public SwimlaneLayoutController(LayoutController layoutController,
                                VisualGraphObjectContainer graphobjectcontainer)
Copy-Constructor for for SwimlaneLayoutController.

Parameters:
layoutController - the LayoutController instance to copy values from.
graphobjectcontainer - The VisualGraphObjectContainer this instance is associated with.
Method Detail

init

protected void init()
Description copied from class: LayoutController
This method must be overwritten by derived LayoutControllers. It should be used to register necessary Layout and define the according layout-contexts.

Specified by:
init in class LayoutController

deepCopy

public LayoutController deepCopy(VisualGraphObjectContainer visualgraphview)
Description copied from class: LayoutController
Override this method with a meaningful deep-copy operation that returns a new independent layout-controller associated with the given VisualGraphObjectContainer.

Specified by:
deepCopy in class LayoutController
Parameters:
visualgraphview - the VisualGraphObjectContainer the copy is to be associated with.
Returns:
a deep-copy of the instance.

setVisualGraphObjectContainer

public void setVisualGraphObjectContainer(VisualGraphObjectContainer visualGraphObjectContainer)
Description copied from class: LayoutController
Sets the VisualGraphObjectContainer that is to be associated.
Notice: It is not necessary to invoke this method explicitly if the method VisualGraphView.setLayoutController(LayoutController) was used since the VisualGraphView calls this method internally.

Overrides:
setVisualGraphObjectContainer in class LayoutController
Parameters:
visualGraphObjectContainer - the associated VisualGraphObjectContainer.

apply

public boolean apply()
Description copied from class: LayoutController
This method applies a layout on the visual nodes and edges of the associated VisualGraphObjectContainer which should, together with an appropriate edge layout context and node layout context, be set in advance. You can set the layout contexts for the main graph and nested subgraphs by invoking methods Layoutable.setNodeLayoutContext(String) and Layoutable.setEdgeLayoutContext(String) or the helper method pair LayoutController.setNodeLayoutContext(String) and LayoutController.setEdgeLayoutContext(String). This method processes subgraphs recursively in a post-order tree traversal. Please note that for a recursive layout, the algorithm is applied to all subgraphs before their parents. The methods LayoutController.onBeginVisualSubgraphLayout(VisualSubgraph) and LayoutController.onLayoutSubgraph(VisualSubgraph) will be triggered for each subgraph. The methods LayoutController.onBeginLayout() and LayoutController.onEndLayout() will be triggered before and after the main graph is arranged respectively.
Notice: The layout area is restricted according to the current layout domain. Please see LayoutController.getLayoutDomain() for more information.

Overrides:
apply in class LayoutController
Returns:
true if the function was successful; otherwise false, in which case the method LayoutController.getErrorMessage() could be used to obtain details about the error.
See Also:
LayoutController.setVisualGraphObjectContainer(VisualGraphObjectContainer), LayoutController.setNodeLayoutContext(String), LayoutController.setEdgeLayoutContext(String), LayoutController.apply(List, String, String), LayoutController.apply(String), LayoutController.getLayoutDomain()

applyDynamic

public boolean applyDynamic()
Description copied from class: LayoutController
This method causes the LayoutController to perform a single dynamic layout. Usually this method is not invoked directly by the client. Instead it is invoked by the framework internally during user interaction.
However it may be needed to invoke this method directly in case the graph was manipulated in a programmatically way that rendered it in a non layouted state.

Overrides:
applyDynamic in class LayoutController
Returns:
true if the layout was successful, otherwise false; in this case the method LayoutController.getErrorMessage() can be used to obtain a description of the error's reason.
See Also:
LayoutController.isDynamicLayoutSupported(), LayoutController.enableDynamicNodeLayout(boolean), LayoutController.enableDynamicEdgeLayout(boolean)

verifySwimLaneStructure

public static final void verifySwimLaneStructure(VisualGraphObjectContainer visualgraphview)
Verifies the structure of the given VisualGraphObjectContainer. The structure is assumed to be a valid swimlane-pool based swimlanes graph.

Parameters:
visualgraphview - the VisualGraphObjectContainer to verify.


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