edu.uci.ics.jung.algorithms.layout
Class BalloonLayout<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.layout.TreeLayout<V,E>
edu.uci.ics.jung.algorithms.layout.BalloonLayout<V,E>
- All Implemented Interfaces:
- Layout<V,E>, org.apache.commons.collections15.Transformer<V,Point2D>
public class BalloonLayout<V,E>
- extends TreeLayout<V,E>
A Layout
implementation that assigns positions to Tree
or
Forest
vertices using associations with nested circles ("balloons").
A balloon is nested inside another balloon if the first balloon's subtree
is a subtree of the second balloon's subtree.
- Author:
- Tom Nelson
Methods inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout |
buildTree, buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setCurrentPositionFor, setGraph, setInitializer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
polarLocations
protected Map<V,PolarPoint> polarLocations
radii
protected Map<V,Double> radii
BalloonLayout
public BalloonLayout(Forest<V,E> g)
- Creates an instance based on the input forest.
setRootPolars
protected void setRootPolars()
setRootPolar
protected void setRootPolar(V root)
setPolars
protected void setPolars(List<V> kids,
Point2D parentLocation,
double parentRadius)
setSize
public void setSize(Dimension size)
- Description copied from class:
TreeLayout
- This method is not supported by this class. The size of the layout
is determined by the topology of the tree, and by the horizontal
and vertical spacing (optionally set by the constructor).
- Specified by:
setSize
in interface Layout<V,E>
- Overrides:
setSize
in class TreeLayout<V,E>
getCenter
public Point2D getCenter(V v)
- Returns the coordinates of
v
's parent, or the
center of this layout's area if it's a root.
setLocation
public void setLocation(V v,
Point2D location)
- Description copied from interface:
Layout
- set the location of a vertex
- Specified by:
setLocation
in interface Layout<V,E>
- Overrides:
setLocation
in class TreeLayout<V,E>
transform
public Point2D transform(V v)
- Specified by:
transform
in interface org.apache.commons.collections15.Transformer<V,Point2D>
- Overrides:
transform
in class TreeLayout<V,E>
getRadii
public Map<V,Double> getRadii()
- Returns:
- the radii
Copyright © 2009. All Rights Reserved.