Class AbstractHierarchicalMinCrossLayoutAlgorithm<V,E>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.AbstractHierarchicalMinCrossLayoutAlgorithm<V,E>
-
- Type Parameters:
V- vertex typeE- edge type
- All Implemented Interfaces:
Consumer<Function<V,Rectangle>>,Layered<V,E>,LayoutAlgorithm<V>,AfterRunnable,EdgeArticulationFunctionSupplier<E>,ExecutorConsumer,Threaded,VertexBoundsFunctionConsumer<V>
- Direct Known Subclasses:
EiglspergerLayoutAlgorithm,HierarchicalMinCrossLayoutAlgorithm,SugiyamaLayoutAlgorithm
public abstract class AbstractHierarchicalMinCrossLayoutAlgorithm<V,E> extends Object implements LayoutAlgorithm<V>, VertexBoundsFunctionConsumer<V>, EdgeArticulationFunctionSupplier<E>, Layered<V,E>, AfterRunnable, Threaded, ExecutorConsumer
The Sugiyama Hierarchical Minimum-Cross layout algorithm- See Also:
- "Methods for Visual Understanding Hierarchical System Structures. KOZO SUGIYAMA, MEMBER, IEEE, SHOJIRO TAGAWA, AND MITSUHIKO TODA, MEMBER, IEEE", "An E log E Line Crossing Algorithm for Levelled Graphs. Vance Waddle and Ashok Malhotra IBM Thomas J. Watson Research Center", "Simple and Efficient Bilayer Cross Counting. Wilhelm Barth, Petra Mutzel, Institut für Computergraphik und Algorithmen Technische Universität Wien, Michael Jünger, Institut für Informatik Universität zu Köln", "Fast and Simple Horizontal Coordinate Assignment, Ulrik Brandes and Boris Köpf, Department of Computer & Information Science, University of Konstanz"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractHierarchicalMinCrossLayoutAlgorithm.Builder<V,E,T extends AbstractHierarchicalMinCrossLayoutAlgorithm<V,E> & EdgeAwareLayoutAlgorithm<V,E>,B extends AbstractHierarchicalMinCrossLayoutAlgorithm.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>
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.layout.algorithms.util.Threaded
Threaded.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description protected Runnableafterprotected Rectangleboundsprotected booleancancelledprotected AtomicIntegercompletionCounterprotected Map<E,List<Point>>edgePointMapprotected Executorexecutorprotected booleanexpandLayoutprotected static RectangleIDENTITY_SHAPEprotected Layeringlayeringprotected LayoutModel<V>layoutModelprotected static StringMAX_LEVEL_CROSSprotected intmaxLevelCrossprotected Function<org.jgrapht.Graph<V,E>,Integer>maxLevelCrossFunctionprotected static StringMINCROSS_POST_STRAIGHTENprotected static StringMINCROSS_STRAIGHTEN_EDGESprotected static StringMINCROSS_THREADEDprotected booleanpostStraightenprotected List<V>rootsprotected Set<LayeredRunnable<E>>runnablesprotected booleanseparateComponentsprotected booleanstraightenEdgesprotected booleanthreadedprotected booleantransposeprotected static StringTRANSPOSE_LIMITprotected Function<V,Rectangle>vertexBoundsFunction
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractHierarchicalMinCrossLayoutAlgorithm(Function<V,Rectangle> vertexBoundsFunction, boolean straightenEdges, boolean postStraighten, boolean transpose, int maxLevelCross, Function<org.jgrapht.Graph<V,E>,Integer> maxLevelCrossFunction, boolean expandLayout, Layering layering, boolean threaded, Executor executor, boolean separateComponents, Runnable after)protectedAbstractHierarchicalMinCrossLayoutAlgorithm(AbstractHierarchicalMinCrossLayoutAlgorithm.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancel()booleanconstrained()Function<E,List<Point>>getEdgeArticulationFunction()ExecutorgetExecutor()protected abstract LayeredRunnable<E>getRunnable(int componentCount, LayoutModel<V> componentLayoutModel)protected booleanisComplete(int expected)booleanisThreaded()voidrunAfter()voidsetAfter(Runnable after)voidsetExecutor(Executor executor)voidsetLayering(Layering layering)voidsetMaxLevelCrossFunction(Function<org.jgrapht.Graph<V,E>,Integer> maxLevelCrossFunction)voidsetThreaded(boolean threaded)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.VertexBoundsFunctionConsumer
accept
-
-
-
-
Field Detail
-
IDENTITY_SHAPE
protected static final Rectangle IDENTITY_SHAPE
-
MINCROSS_STRAIGHTEN_EDGES
protected static final String MINCROSS_STRAIGHTEN_EDGES
- See Also:
- Constant Field Values
-
MINCROSS_POST_STRAIGHTEN
protected static final String MINCROSS_POST_STRAIGHTEN
- See Also:
- Constant Field Values
-
MINCROSS_THREADED
protected static final String MINCROSS_THREADED
- See Also:
- Constant Field Values
-
TRANSPOSE_LIMIT
protected static final String TRANSPOSE_LIMIT
- See Also:
- Constant Field Values
-
MAX_LEVEL_CROSS
protected static final String MAX_LEVEL_CROSS
- See Also:
- Constant Field Values
-
bounds
protected Rectangle bounds
-
straightenEdges
protected boolean straightenEdges
-
postStraighten
protected boolean postStraighten
-
transpose
protected boolean transpose
-
maxLevelCross
protected int maxLevelCross
-
expandLayout
protected boolean expandLayout
-
threaded
protected boolean threaded
-
layering
protected Layering layering
-
executor
protected Executor executor
-
after
protected Runnable after
-
separateComponents
protected boolean separateComponents
-
completionCounter
protected AtomicInteger completionCounter
-
runnables
protected Set<LayeredRunnable<E>> runnables
-
layoutModel
protected LayoutModel<V> layoutModel
-
cancelled
protected boolean cancelled
-
-
Constructor Detail
-
AbstractHierarchicalMinCrossLayoutAlgorithm
protected AbstractHierarchicalMinCrossLayoutAlgorithm(AbstractHierarchicalMinCrossLayoutAlgorithm.Builder builder)
-
AbstractHierarchicalMinCrossLayoutAlgorithm
protected AbstractHierarchicalMinCrossLayoutAlgorithm(Function<V,Rectangle> vertexBoundsFunction, boolean straightenEdges, boolean postStraighten, boolean transpose, int maxLevelCross, Function<org.jgrapht.Graph<V,E>,Integer> maxLevelCrossFunction, boolean expandLayout, Layering layering, boolean threaded, Executor executor, boolean separateComponents, Runnable after)
-
-
Method Detail
-
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>
-
setLayering
public void setLayering(Layering layering)
- Specified by:
setLayeringin interfaceLayered<V,E>
-
setMaxLevelCrossFunction
public void setMaxLevelCrossFunction(Function<org.jgrapht.Graph<V,E>,Integer> maxLevelCrossFunction)
- Specified by:
setMaxLevelCrossFunctionin interfaceLayered<V,E>
-
isThreaded
public boolean isThreaded()
- Specified by:
isThreadedin interfaceThreaded
-
setThreaded
public void setThreaded(boolean threaded)
- Specified by:
setThreadedin interfaceThreaded
-
cancel
public void cancel()
- Specified by:
cancelin interfaceLayoutAlgorithm<V>- Specified by:
cancelin interfaceThreaded
-
isComplete
protected boolean isComplete(int expected)
-
setExecutor
public void setExecutor(Executor executor)
- Specified by:
setExecutorin interfaceExecutorConsumer
-
getExecutor
public Executor getExecutor()
- Specified by:
getExecutorin interfaceExecutorConsumer
-
getRunnable
protected abstract LayeredRunnable<E> getRunnable(int componentCount, LayoutModel<V> componentLayoutModel)
-
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
-
runAfter
public void runAfter()
- Specified by:
runAfterin interfaceAfterRunnable
-
setAfter
public void setAfter(Runnable after)
- Specified by:
setAfterin interfaceAfterRunnable
-
constrained
public boolean constrained()
- Specified by:
constrainedin interfaceLayoutAlgorithm<V>
-
-