Class LayeredLayoutAlgorithm<V,E>
- java.lang.Object
-
- org.jungrapht.samples.sugiyama.test.algorithms.LayeredLayoutAlgorithm<V,E>
-
- Type Parameters:
V-E-
- All Implemented Interfaces:
Consumer<Function<V,Rectangle>>,LayoutAlgorithm<V>,AfterRunnable,EdgeArticulationFunctionSupplier<E>,VertexBoundsFunctionConsumer<V>
public class LayeredLayoutAlgorithm<V,E> extends Object implements LayoutAlgorithm<V>, EdgeArticulationFunctionSupplier<E>, VertexBoundsFunctionConsumer<V>
Test only, as this class is hard-coded for a specific test graph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLayeredLayoutAlgorithm.Builder<V,E,T extends LayeredLayoutAlgorithm<V,E> & EdgeAwareLayoutAlgorithm<V,E>,B extends LayeredLayoutAlgorithm.Builder<V,E,T,B>>a Builder to create a configured instance-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.layout.algorithms.LayoutAlgorithm
LayoutAlgorithm.NoOp<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected Rectangleboundsprotected booleanexpandLayoutprotected List<V>rootsprotected Function<V,Rectangle>vertexBoundsFunction
-
Constructor Summary
Constructors Constructor Description LayeredLayoutAlgorithm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V,E>
LayeredLayoutAlgorithm.Builder<V,E,?,?>edgeAwareBuilder()Function<E,List<Point>>getEdgeArticulationFunction()static <V> voidrearrangeLayers(List<List<LV<V>>> layers)voidsetVertexBoundsFunction(Function<V,Rectangle> vertexBoundsFunction)voidvisit(LayoutModel<V> layoutModel)visit the passed layoutModel and set its locations-
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, constrained
-
Methods inherited from interface org.jungrapht.visualization.layout.algorithms.util.VertexBoundsFunctionConsumer
accept
-
-
-
-
Method Detail
-
edgeAwareBuilder
public static <V,E> LayeredLayoutAlgorithm.Builder<V,E,?,?> edgeAwareBuilder()
- Type Parameters:
V- vertex typeE- edge type- Returns:
- a Builder ready to configure
-
setVertexBoundsFunction
public void setVertexBoundsFunction(Function<V,Rectangle> vertexBoundsFunction)
- Specified by:
setVertexBoundsFunctionin interfaceVertexBoundsFunctionConsumer<V>
-
getEdgeArticulationFunction
public Function<E,List<Point>> getEdgeArticulationFunction()
- Specified by:
getEdgeArticulationFunctionin interfaceEdgeArticulationFunctionSupplier<V>
-
visit
public void visit(LayoutModel<V> layoutModel)
Description copied from interface:LayoutAlgorithmvisit the passed layoutModel and set its locations- Specified by:
visitin interfaceLayoutAlgorithm<V>- Parameters:
layoutModel- the mediator between the container for vertices (the Graph) and the mapping from Vertex to Point
-
-