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 java.util.Map<V,PolarPoint> |
polarLocations |
protected java.util.Map<V,java.lang.Double> |
radii |
alreadyDone, basePositions, DEFAULT_DISTX, DEFAULT_DISTY, distX, distY, graph, locations, m_currentPoint, size
Constructor and Description |
---|
BalloonLayout()
Creates an instance which does not initialize the vertex locations.
|
BalloonLayout(Forest<V,E> g)
Creates an instance based on the input forest.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D |
getCenter(V v)
Returns the coordinates of
v 's parent, or the
center of this layout's area if it's a root. |
java.util.Map<V,java.lang.Double> |
getRadii() |
void |
setLocation(V v,
java.awt.geom.Point2D location)
set the location of a vertex
|
protected void |
setPolars(java.util.List<V> kids,
java.awt.geom.Point2D parentLocation,
double parentRadius) |
protected void |
setRootPolar(V root) |
protected void |
setRootPolars() |
void |
setSize(java.awt.Dimension size)
This method is not supported by this class.
|
java.awt.geom.Point2D |
transform(V v) |
buildTree, buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setCurrentPositionFor, setGraph, setInitializer
protected java.util.Map<V,PolarPoint> polarLocations
protected java.util.Map<V,java.lang.Double> radii
public BalloonLayout()
protected void setRootPolars()
protected void setRootPolar(V root)
protected void setPolars(java.util.List<V> kids, java.awt.geom.Point2D parentLocation, double parentRadius)
public void setSize(java.awt.Dimension size)
TreeLayout
public java.awt.geom.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, java.awt.geom.Point2D location)
Layout
setLocation
in interface Layout<V,E>
setLocation
in class TreeLayout<V,E>
public java.awt.geom.Point2D transform(V v)
transform
in interface org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D>
transform
in class TreeLayout<V,E>
public java.util.Map<V,java.lang.Double> getRadii()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence