de.saar.chorus.jgraph
Class GecodeTreeLayout

Object
  extended by JGraphLayoutAlgorithm
      extended by ImprovedJGraphLayout
          extended by GecodeTreeLayout

public class GecodeTreeLayout
extends ImprovedJGraphLayout

A layout algorithm for a solved form of a dominance graph represented by a JDomGraph. This tree layout uses the GECODE tree layout classes.

Author:
Michaela Regneri

Constructor Summary
GecodeTreeLayout(ImprovedJGraph gr)
          Initializes a new SolvedFormLayout with the given JDomGraph.
GecodeTreeLayout(ImprovedJGraph gr, int offset)
          Initializes a new SolvedFormLayout with the given JDomGraph.
 
Method Summary
 void addRelXtoParent(DefaultGraphCell node, Integer x)
           
 void addRelXtoRoot(DefaultGraphCell node, Integer x)
           
 void addRelYpos(DefaultGraphCell node, Integer y)
           
 Shape getNodesToShape(DefaultGraphCell node)
           
 int getNodeWidth(DefaultGraphCell node)
          Returns the node width computed by the JDomGraph.
 Integer getRelXtoParent(DefaultGraphCell node)
           
 void putNodeToShape(DefaultGraphCell node, Shape shape)
           
 void run(JGraph gr, Object[] cells, int arg2)
          Starts the layout algorithm.
 
Methods inherited from class JGraphLayoutAlgorithm
createDialog, createDialog, createSettings, getHint, getMaximumProgress, getProgress, isAllowedToRun, populateDialog, run, setAllowedToRun, setMaximumProgress, setProgress
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GecodeTreeLayout

public GecodeTreeLayout(ImprovedJGraph gr)
Initializes a new SolvedFormLayout with the given JDomGraph.

Parameters:
gr - the solved form as JDomGraph to layout

GecodeTreeLayout

public GecodeTreeLayout(ImprovedJGraph gr,
                        int offset)
Initializes a new SolvedFormLayout with the given JDomGraph.

Parameters:
gr - the solved form as JDomGraph to layout
Method Detail

run

public void run(JGraph gr,
                Object[] cells,
                int arg2)
Starts the layout algorithm.

Specified by:
run in class ImprovedJGraphLayout

getRelXtoParent

public Integer getRelXtoParent(DefaultGraphCell node)
Specified by:
getRelXtoParent in class ImprovedJGraphLayout

addRelXtoParent

public void addRelXtoParent(DefaultGraphCell node,
                            Integer x)
Specified by:
addRelXtoParent in class ImprovedJGraphLayout

addRelXtoRoot

public void addRelXtoRoot(DefaultGraphCell node,
                          Integer x)
Specified by:
addRelXtoRoot in class ImprovedJGraphLayout

addRelYpos

public void addRelYpos(DefaultGraphCell node,
                       Integer y)
Specified by:
addRelYpos in class ImprovedJGraphLayout

getNodeWidth

public int getNodeWidth(DefaultGraphCell node)
Returns the node width computed by the JDomGraph.

Specified by:
getNodeWidth in class ImprovedJGraphLayout
Parameters:
node - the node to compute the width for
Returns:
the width

getNodesToShape

public Shape getNodesToShape(DefaultGraphCell node)
Specified by:
getNodesToShape in class ImprovedJGraphLayout

putNodeToShape

public void putNodeToShape(DefaultGraphCell node,
                           Shape shape)
Specified by:
putNodeToShape in class ImprovedJGraphLayout