logic
Class GraphProcessing

java.lang.Object
  extended by logic.GraphProcessing

public class GraphProcessing
extends java.lang.Object


Nested Class Summary
 class GraphProcessing.BreadthFirstIterator
          a Breath First Iterator traversing the graph (gernerateTree() has to be called previously)
 class GraphProcessing.DepthFirstIterator
          a Depth First Iterator traversing the graph (gernerateTree() has to be called previously)
 
Constructor Summary
GraphProcessing()
           
 
Method Summary
 void addChild(Node node, Node father)
           
 void addEdge(Node n1, Node n2)
           
 void generateTree(Node focusNode)
          main part of the algorithm.
 Node getFocusNode()
           
 GraphProcessing.BreadthFirstIterator iteratorBreadthFirst()
          returns an iterator, that traverses the graph like a tree with breadth-first search.
 GraphProcessing.DepthFirstIterator iteratorDepthFirst()
          returns an iterator, that traverses the graph like a tree with depth-first search.
 void removeNode(Node node)
           
 void removeSubtree(Node node)
           
 void setFocusNode(Node focusNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphProcessing

public GraphProcessing()
Method Detail

generateTree

public void generateTree(Node focusNode)
main part of the algorithm. generates a tree out of the graph and sets the angle and ring at which the node has to be placed.

Parameters:
focusNode -

iteratorBreadthFirst

public GraphProcessing.BreadthFirstIterator iteratorBreadthFirst()
returns an iterator, that traverses the graph like a tree with breadth-first search. so gernerateTree() has to be called previously

Returns:
iterator

iteratorDepthFirst

public GraphProcessing.DepthFirstIterator iteratorDepthFirst()
returns an iterator, that traverses the graph like a tree with depth-first search. so gernerateTree() has to be called previously

Returns:
iterator

getFocusNode

public Node getFocusNode()

setFocusNode

public void setFocusNode(Node focusNode)

addChild

public void addChild(Node node,
                     Node father)

removeNode

public void removeNode(Node node)

removeSubtree

public void removeSubtree(Node node)

addEdge

public void addEdge(Node n1,
                    Node n2)