public class BalloonLayout<V,E> extends TreeLayout<V,E>
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.Modifier and Type | Field and Description |
---|---|
protected Map<V,PolarPoint> |
polarLocations |
protected Map<V,Double> |
radii |
alreadyDone, basePositions, DEFAULT_DISTX, DEFAULT_DISTY, distX, distY, graph, locations, m_currentPoint, size
Constructor and Description |
---|
BalloonLayout(Forest<V,E> g)
Creates an instance based on the input forest.
|
Modifier and Type | Method and Description |
---|---|
Point2D |
getCenter(V v)
Returns the coordinates of
v 's parent, or the
center of this layout's area if it's a root. |
Map<V,Double> |
getRadii() |
void |
setLocation(V v,
Point2D location)
set the location of a vertex
|
protected void |
setPolars(List<V> kids,
Point2D parentLocation,
double parentRadius) |
protected void |
setRootPolar(V root) |
protected void |
setRootPolars() |
void |
setSize(Dimension size)
This method is not supported by this class.
|
Point2D |
transform(V v) |
buildTree, buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setCurrentPositionFor, setGraph, setInitializer
protected Map<V,PolarPoint> polarLocations
protected void setRootPolars()
protected void setRootPolar(V root)
public void setSize(Dimension size)
TreeLayout
public Point2D getCenter(V v)
v
's parent, or the
center of this layout's area if it's a root.public void setLocation(V v, Point2D location)
Layout
setLocation
in interface Layout<V,E>
setLocation
in class TreeLayout<V,E>
Copyright © 2014. All rights reserved.