Class RadialTreeLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.TreeLayout<V,E>
-
- edu.uci.ics.jung.algorithms.layout.RadialTreeLayout<V,E>
-
- All Implemented Interfaces:
com.google.common.base.Function<V,java.awt.geom.Point2D>
,Layout<V,E>
,java.util.function.Function<V,java.awt.geom.Point2D>
public class RadialTreeLayout<V,E> extends TreeLayout<V,E>
A radial layout for Tree or Forest graphs.- Author:
- Tom Nelson
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<V,PolarPoint>
polarLocations
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout
alreadyDone, basePositions, DEFAULT_DISTX, DEFAULT_DISTY, distX, distY, graph, locations, m_currentPoint, size
-
-
Constructor Summary
Constructors Constructor Description RadialTreeLayout(Forest<V,E> g)
RadialTreeLayout(Forest<V,E> g, int distx)
RadialTreeLayout(Forest<V,E> g, int distx, int disty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D
apply(V v)
protected void
buildTree()
java.util.Map<V,PolarPoint>
getPolarLocations()
protected void
setCurrentPositionFor(V vertex)
void
setLocation(V v, java.awt.geom.Point2D location)
Changes the layout coordinates ofv
tolocation
.void
setSize(java.awt.Dimension size)
This method is not supported by this class.-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout
buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setGraph, setInitializer
-
-
-
-
Field Detail
-
polarLocations
protected java.util.Map<V,PolarPoint> polarLocations
-
-
Method Detail
-
buildTree
protected void buildTree()
- Overrides:
buildTree
in classTreeLayout<V,E>
-
setSize
public void setSize(java.awt.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).
-
setCurrentPositionFor
protected void setCurrentPositionFor(V vertex)
- Overrides:
setCurrentPositionFor
in classTreeLayout<V,E>
-
setLocation
public void setLocation(V v, java.awt.geom.Point2D location)
Description copied from interface:Layout
Changes the layout coordinates ofv
tolocation
.- Specified by:
setLocation
in interfaceLayout<V,E>
- Overrides:
setLocation
in classTreeLayout<V,E>
- Parameters:
v
- the vertex whose location is to be specifiedlocation
- the coordinates of the specified location
-
getPolarLocations
public java.util.Map<V,PolarPoint> getPolarLocations()
- Returns:
- a map from vertices to their locations in polar coordinates.
-
-