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 com.google.common.cache.LoadingCache<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 |
apply(V v) |
Point2D |
getCenter(V v) |
Map<V,Double> |
getRadii() |
void |
setLocation(V v,
Point2D location)
Changes the layout coordinates of
v to location . |
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.
|
buildTree, buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setCurrentPositionFor, setGraph, setInitializer
protected com.google.common.cache.LoadingCache<V,PolarPoint> polarLocations
protected void setRootPolars()
protected void setRootPolar(V root)
public void setSize(Dimension size)
TreeLayout
public Point2D getCenter(V v)
v
- the vertex whose center is to be returnedv
's parent, or the center of this layout's area if it's a root.public void setLocation(V v, Point2D location)
Layout
v
to location
.setLocation
in interface Layout<V,E>
setLocation
in class TreeLayout<V,E>
v
- the vertex whose location is to be specifiedlocation
- the coordinates of the specified locationCopyright © 2015. All rights reserved.