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:
- com.google.common.base.Function<V,java.awt.geom.Point2D>, Layout<V,E>
public class BalloonLayout<V,E> extends TreeLayout<V,E>
ALayoutimplementation that assigns positions toTreeorForestvertices 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.
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout
DEFAULT_DISTX, DEFAULT_DISTY
-
-
Constructor Summary
Constructors Constructor and Description BalloonLayout(Forest<V,E> g)Creates an instance based on the input forest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.geom.Point2Dapply(V v)java.awt.geom.Point2DgetCenter(V v)java.util.Map<V,java.lang.Double>getRadii()voidsetLocation(V v, java.awt.geom.Point2D location)Changes the layout coordinates ofvtolocation.voidsetSize(java.awt.Dimension size)This method is not supported by this class.-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout
getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setGraph, setInitializer
-
-
-
-
Method Detail
-
setSize
public void setSize(java.awt.Dimension size)
Description copied from class:TreeLayoutThis 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).
-
getCenter
public java.awt.geom.Point2D getCenter(V v)
- Parameters:
v- the vertex whose center is to be returned- 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, java.awt.geom.Point2D location)
Description copied from interface:LayoutChanges the layout coordinates ofvtolocation.- Specified by:
setLocationin interfaceLayout<V,E>- Overrides:
setLocationin classTreeLayout<V,E>- Parameters:
v- the vertex whose location is to be specifiedlocation- the coordinates of the specified location
-
apply
public java.awt.geom.Point2D apply(V v)
- Specified by:
applyin interfacecom.google.common.base.Function<V,java.awt.geom.Point2D>- Overrides:
applyin classTreeLayout<V,E>
-
getRadii
public java.util.Map<V,java.lang.Double> getRadii()
- Returns:
- the radii
-
-
DataMelt 3.0 © DataMelt by jWork.ORG