Class TidierRadialTreeLayoutAlgorithm<V,E>
- java.lang.Object
 - 
- org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm<V>
 - 
- org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm<V>
 - 
- org.jungrapht.visualization.layout.algorithms.TidierTreeLayoutAlgorithm<V,E>
 - 
- org.jungrapht.visualization.layout.algorithms.TidierRadialTreeLayoutAlgorithm<V,E>
 
 
 
 
 
- 
- All Implemented Interfaces:
 Consumer<Function<V,Rectangle>>,EdgeAwareLayoutAlgorithm<V,E>,EdgePredicated<E>,EdgeSorting<E>,LayoutAlgorithm<V>,Radial,RadialTreeLayout<V>,TreeLayout<V>,AfterRunnable,VertexBoundsFunctionConsumer<V>,VertexPredicated<V>,VertexSorting<V>
public class TidierRadialTreeLayoutAlgorithm<V,E> extends TidierTreeLayoutAlgorithm<V,E> implements RadialTreeLayout<V>
A radial layout for Tree or Forest graphs. Positions vertices in concentric circles with the root at the center- Author:
 - Tom Nelson
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTidierRadialTreeLayoutAlgorithm.Builder<V,E,T extends TidierRadialTreeLayoutAlgorithm<V,E>,B extends TidierRadialTreeLayoutAlgorithm.Builder<V,E,T,B>>- 
Nested classes/interfaces inherited from interface org.jungrapht.visualization.layout.algorithms.LayoutAlgorithm
LayoutAlgorithm.NoOp<V> 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description protected Map<V,PolarPoint>polarLocations- 
Fields inherited from class org.jungrapht.visualization.layout.algorithms.TidierTreeLayoutAlgorithm
bounds, builderRootPredicate, edgeComparator, edgePredicate, heights, layoutModel, neighborCache, roots, tree, vertexComparator, vertexPredicate 
- 
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm
baseBounds, correctOverlap, defaultRootPredicate, expandLayout, horizontalVertexSpacing, rootComparator, rootPredicate, vertexBoundsFunction, verticalVertexSpacing 
- 
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm
after 
- 
Fields inherited from interface org.jungrapht.visualization.layout.algorithms.TreeLayout
TREE_LAYOUT_HORIZONTAL_SPACING, TREE_LAYOUT_VERTICAL_SPACING 
 - 
 
- 
Constructor Summary
Constructors Modifier Constructor Description TidierRadialTreeLayoutAlgorithm()protectedTidierRadialTreeLayoutAlgorithm(TidierRadialTreeLayoutAlgorithm.Builder<V,E,?,?> builder) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconstrained()intdiameter(LayoutModel<V> layoutModel)static <V,E>
TidierRadialTreeLayoutAlgorithm.Builder<V,E,?,?>edgeAwareBuilder()protected PointgetCartesian(LayoutModel<V> layoutModel, V vertex)PointgetCenter(LayoutModel<V> layoutModel)protected intgetInitialPosition(int initialPosition, int layoutHeight, int treeHeight)override for to always start at zeroprotected PointgetMaxXY(LayoutModel<V> layoutModel)Map<V,PolarPoint>getPolarLocations()protected voidoffset(LayoutModel<V> layoutModel, int deltax, int deltay)protected voidputRadialPointsInModel(LayoutModel<V> layoutModel)protected voidsetRadialLocations(List<V> roots, LayoutModel<V> layoutModel)voidvisit(LayoutModel<V> layoutModel)visit aLayoutModelto set all of the graph vertex positions according to the LayoutAlgorithm logic.- 
Methods inherited from class org.jungrapht.visualization.layout.algorithms.TidierTreeLayoutAlgorithm
buildTree, clearMetadata, getBaseBounds, setEdgeComparator, setEdgePredicate, setVertexComparator, setVertexPredicate 
- 
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm
adjustToFill, expandToFill, moveVerticesThatOverlapVerticalEdges, setRootComparator, setRootPredicate, setVertexBoundsFunction 
- 
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm
computeAverageVertexDimension, computeLayoutExtent, expandToFill, runAfter, setAfter 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.util.AfterRunnable
runAfter, setAfter 
- 
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.LayoutAlgorithm
cancel 
- 
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.RadialTreeLayout
getBaseBounds 
- 
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.TreeLayout
setRootComparator, setRootPredicate 
- 
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.util.VertexBoundsFunctionConsumer
accept, setVertexBoundsFunction 
 - 
 
 - 
 
- 
- 
Field Detail
- 
polarLocations
protected Map<V,PolarPoint> polarLocations
 
 - 
 
- 
Constructor Detail
- 
TidierRadialTreeLayoutAlgorithm
public TidierRadialTreeLayoutAlgorithm()
 
- 
TidierRadialTreeLayoutAlgorithm
protected TidierRadialTreeLayoutAlgorithm(TidierRadialTreeLayoutAlgorithm.Builder<V,E,?,?> builder)
 
 - 
 
- 
Method Detail
- 
edgeAwareBuilder
public static <V,E> TidierRadialTreeLayoutAlgorithm.Builder<V,E,?,?> edgeAwareBuilder()
 
- 
visit
public void visit(LayoutModel<V> layoutModel)
Description copied from class:AbstractTreeLayoutAlgorithmvisit aLayoutModelto set all of the graph vertex positions according to the LayoutAlgorithm logic.- Specified by:
 visitin interfaceEdgeAwareLayoutAlgorithm<V,E>- Specified by:
 visitin interfaceLayoutAlgorithm<V>- Overrides:
 visitin classTidierTreeLayoutAlgorithm<V,E>- Parameters:
 layoutModel- the mediator between the container for vertices (the Graph) and the mapping
 
- 
offset
protected void offset(LayoutModel<V> layoutModel, int deltax, int deltay)
 
- 
diameter
public int diameter(LayoutModel<V> layoutModel)
- Specified by:
 diameterin interfaceRadialTreeLayout<V>
 
- 
getInitialPosition
protected int getInitialPosition(int initialPosition, int layoutHeight, int treeHeight)override for to always start at zero- Parameters:
 layoutHeight-treeHeight-- Returns:
 - 0 for any supplied values
 
 
- 
putRadialPointsInModel
protected void putRadialPointsInModel(LayoutModel<V> layoutModel)
 
- 
getPolarLocations
public Map<V,PolarPoint> getPolarLocations()
- Specified by:
 getPolarLocationsin interfaceRadialTreeLayout<V>- Returns:
 - a map from vertices to their locations in polar coordinates.
 
 
- 
getCartesian
protected Point getCartesian(LayoutModel<V> layoutModel, V vertex)
 
- 
getMaxXY
protected Point getMaxXY(LayoutModel<V> layoutModel)
 
- 
setRadialLocations
protected void setRadialLocations(List<V> roots, LayoutModel<V> layoutModel)
 
- 
getCenter
public Point getCenter(LayoutModel<V> layoutModel)
- Specified by:
 getCenterin interfaceRadialTreeLayout<V>- Returns:
 - the center of this layout's area.
 
 
- 
constrained
public boolean constrained()
- Specified by:
 constrainedin interfaceLayoutAlgorithm<V>- Specified by:
 constrainedin interfaceRadialTreeLayout<V>- Overrides:
 constrainedin classAbstractTreeLayoutAlgorithm<V>
 
 - 
 
 -