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:
Layout<V,E>,org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>
public class RadialTreeLayout<V,E> extends TreeLayout<V,E>
A radial layout for Tree or Forest graphs.
-
-
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(edu.uci.ics.jung.graph.Forest<V,E> g)Creates an instance for the specified graph with default X and Y distances.RadialTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g, int distx)Creates an instance for the specified graph and X distance with default Y distance.RadialTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g, int distx, int disty)Creates an instance for the specified graph, X distance, and Y distance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildTree()java.util.Map<V,PolarPoint>getPolarLocations()Returns the map from vertices to their locations in polar coordinates.protected voidsetCurrentPositionFor(V vertex)voidsetLocation(V v, java.awt.geom.Point2D location)set the location of a vertexvoidsetSize(java.awt.Dimension size)This method is not supported by this class.java.awt.geom.Point2Dtransform(V v)-
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
-
-
Constructor Detail
-
RadialTreeLayout
public RadialTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g)
Creates an instance for the specified graph with default X and Y distances.
-
RadialTreeLayout
public RadialTreeLayout(edu.uci.ics.jung.graph.Forest<V,E> g, int distx)
Creates an instance for the specified graph and X distance with default Y distance.
-
-
Method Detail
-
buildTree
protected void buildTree()
- Overrides:
buildTreein classTreeLayout<V,E>
-
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).
-
setCurrentPositionFor
protected void setCurrentPositionFor(V vertex)
- Overrides:
setCurrentPositionForin classTreeLayout<V,E>
-
setLocation
public void setLocation(V v, java.awt.geom.Point2D location)
Description copied from interface:Layoutset the location of a vertex- Specified by:
setLocationin interfaceLayout<V,E>- Overrides:
setLocationin classTreeLayout<V,E>
-
getPolarLocations
public java.util.Map<V,PolarPoint> getPolarLocations()
Returns the map from vertices to their locations in polar coordinates.
-
-