de.aitools.iv.graphdrawing.jtree
Class ModelConverter

java.lang.Object
  extended by de.aitools.iv.graphdrawing.jtree.ModelConverter
All Implemented Interfaces:
TreeVertexVisitor

public class ModelConverter
extends java.lang.Object
implements TreeVertexVisitor

Author:
Frank Benteler, bigben@uni-paderborn.de

Constructor Summary
ModelConverter(UndirectedGraph tree, Vertex root, JTreeVisualization jTreeView)
          converts a de.aitools.common.datastructures.graph.UndirectedGraph to javax.swing.tree.TreeModel with the specified root-vertex
 
Method Summary
 JTreeVertexDraw getRoot()
          Returns the JTreeVertexDraw, that was created for the root-Vertex, which were specified in the constructor.
 java.lang.String toString()
          only for debug
 void visit(Vertex v, Vertex parent)
          this Method is public as an implementation side effect.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelConverter

public ModelConverter(UndirectedGraph tree,
                      Vertex root,
                      JTreeVisualization jTreeView)
converts a de.aitools.common.datastructures.graph.UndirectedGraph to javax.swing.tree.TreeModel with the specified root-vertex

Parameters:
tree - - the graph to be converted
root - - the root of the graph
Method Detail

visit

public void visit(Vertex v,
                  Vertex parent)
this Method is public as an implementation side effect.

Specified by:
visit in interface TreeVertexVisitor
See Also:
TreeVertexVisitor.visit(de.aitools.iv.graphdrawing.datastructures.graph.Vertex, de.aitools.iv.graphdrawing.datastructures.graph.Vertex)

getRoot

public JTreeVertexDraw getRoot()
Returns the JTreeVertexDraw, that was created for the root-Vertex, which were specified in the constructor.

Returns:
the created root TreeNode

toString

public java.lang.String toString()
only for debug

Overrides:
toString in class java.lang.Object