com.rapidminer.gui.graphs
Class ShapeBasedTreeLayout<V,E>

java.lang.Object
  extended by com.rapidminer.gui.graphs.ShapeBasedTreeLayout<V,E>
All Implemented Interfaces:
edu.uci.ics.jung.algorithms.layout.Layout<V,E>, org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D>

public class ShapeBasedTreeLayout<V,E>
extends java.lang.Object
implements edu.uci.ics.jung.algorithms.layout.Layout<V,E>

This layout algorithm takes the shapes of the trees into account and performs a non-overlapping layout.

Author:
Ingo Mierswa

Field Summary
protected  java.util.Map<V,java.awt.geom.Point2D> locations
           
 
Constructor Summary
ShapeBasedTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g, org.apache.commons.collections15.Transformer<V,java.awt.Shape> shapeTransformer)
           
 
Method Summary
 java.util.List<V> getAtomics(V p)
           
 java.awt.geom.Point2D getCenter()
           
 java.awt.Dimension getCurrentSize()
           
 edu.uci.ics.jung.graph.Graph<V,E> getGraph()
           
 java.awt.Dimension getSize()
           
 void initialize()
           
 boolean isLocked(V v)
           
 void lock(V v, boolean state)
           
 void reset()
           
 void setGraph(edu.uci.ics.jung.graph.Graph<V,E> graph)
           
 void setInitializer(org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D> initializer)
           
 void setLocation(V v, java.awt.geom.Point2D location)
           
 void setSize(java.awt.Dimension size)
           
 java.awt.geom.Point2D transform(V v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locations

protected java.util.Map<V,java.awt.geom.Point2D> locations
Constructor Detail

ShapeBasedTreeLayout

public ShapeBasedTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g,
                            org.apache.commons.collections15.Transformer<V,java.awt.Shape> shapeTransformer)
Method Detail

getAtomics

public java.util.List<V> getAtomics(V p)

getCurrentSize

public java.awt.Dimension getCurrentSize()

setSize

public void setSize(java.awt.Dimension size)
Specified by:
setSize in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

getGraph

public edu.uci.ics.jung.graph.Graph<V,E> getGraph()
Specified by:
getGraph in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

getSize

public java.awt.Dimension getSize()
Specified by:
getSize in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

initialize

public void initialize()
Specified by:
initialize in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

isLocked

public boolean isLocked(V v)
Specified by:
isLocked in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

lock

public void lock(V v,
                 boolean state)
Specified by:
lock in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

reset

public void reset()
Specified by:
reset in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

setGraph

public void setGraph(edu.uci.ics.jung.graph.Graph<V,E> graph)
Specified by:
setGraph in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

setInitializer

public void setInitializer(org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D> initializer)
Specified by:
setInitializer in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

getCenter

public java.awt.geom.Point2D getCenter()

setLocation

public void setLocation(V v,
                        java.awt.geom.Point2D location)
Specified by:
setLocation in interface edu.uci.ics.jung.algorithms.layout.Layout<V,E>

transform

public java.awt.geom.Point2D transform(V v)
Specified by:
transform in interface org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D>


Copyright © 2001-2009 by Rapid-I