com.tensegrity.graph.layout.controller
Class SwimLanePoolFlattener

java.lang.Object
  extended bycom.tensegrity.graph.layout.controller.SwimLanePoolFlattener

public final class SwimLanePoolFlattener
extends java.lang.Object

This class will generate a new flat VisualGraphView from a given hierarchy of nested VisualGraphObjectContainers by unfolding each container in a bottom-up order, finally yielding a flat VisualGraphView. (The term indicates that there are no VisualSubgraphs nested in the resulting VisualGraphView.

Version:
$Id: SwimLanePoolFlattener.java,v 1.12 2005/03/24 12:43:15 SharokhKhani Exp $
Author:
Sharokh Khani

Constructor Summary
SwimLanePoolFlattener()
          Constructs a new SwimLanePoolFlattener.
 
Method Summary
 void applyChangesToOriginal(VisualGraph visualgraph_original, java.util.List swimlanes, java.util.Map index2lane, java.util.Map lane2attributes)
          This method will reapply changes that occured in the previously (or most recently) created flat VisualGraphView to the specified VisualGraphView as far as possible and/or meaningful.
 VisualSubgraph buildFlatVisualGraphView(VisualGraph visualgraph_original, java.util.List swimlanes, java.util.HashMap index2lane, java.util.HashMap vn_copy2swimlane_index)
          Invoking this method will generate a new flat VisualGraphView.
 VisualNode getOriginalVisualNode(VisualNode visualnode_copy)
          Returns the original VisualNode that corresponds to the copied VisualNode given by visualnode_copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwimLanePoolFlattener

public SwimLanePoolFlattener()
Constructs a new SwimLanePoolFlattener.

Method Detail

buildFlatVisualGraphView

public final VisualSubgraph buildFlatVisualGraphView(VisualGraph visualgraph_original,
                                                     java.util.List swimlanes,
                                                     java.util.HashMap index2lane,
                                                     java.util.HashMap vn_copy2swimlane_index)
Invoking this method will generate a new flat VisualGraphView. (The term indicates that there are no VisualSubgraphs nested in the resulting VisualGraphView.

Parameters:
visualgraph_original - the input VisualGraphView instance to scan and convert.
swimlanes - list of swimlanes
index2lane - mapping of indices to lanes.
vn_copy2swimlane_index - an optional mapping of VisualNodes to swimlanes. Swimlanes are denoted by a simple integer index.
Returns:
the VisualGraphObjectContainer that holds the created VisualEdge.

applyChangesToOriginal

public void applyChangesToOriginal(VisualGraph visualgraph_original,
                                   java.util.List swimlanes,
                                   java.util.Map index2lane,
                                   java.util.Map lane2attributes)
This method will reapply changes that occured in the previously (or most recently) created flat VisualGraphView to the specified VisualGraphView as far as possible and/or meaningful.

Parameters:
visualgraph_original - the original VisualGraphView to apply changes to.
swimlanes - list of lanes.
index2lane - mapping from index to lane.,
lane2attributes - mapping of lane to attributes.

getOriginalVisualNode

public VisualNode getOriginalVisualNode(VisualNode visualnode_copy)
Returns the original VisualNode that corresponds to the copied VisualNode given by visualnode_copy. If there is no corresponding original VisualNode null is returned.

Parameters:
visualnode_copy - the VisualNode to return the corresponding original VisualNode for
Returns:
VisualNode the original VisualNode that corresponds to the given copied VisualNode or null.


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