- java.lang.Object
-
- org.jgrapht.alg.drawing.BaseLayoutAlgorithm2D<V,E>
-
- Type Parameters:
V
- the vertex typeE
- the edge type
- All Implemented Interfaces:
LayoutAlgorithm2D<V,E>
- Direct Known Subclasses:
CircularLayoutAlgorithm2D
,FRLayoutAlgorithm2D
,RandomLayoutAlgorithm2D
,RescaleLayoutAlgorithm2D
abstract class BaseLayoutAlgorithm2D<V,E> extends java.lang.Object implements LayoutAlgorithm2D<V,E>
A base class for a 2d layout algorithm.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.Function<V,Point2D>
initializer
A model initializer
-
Constructor Summary
Constructors Constructor Description BaseLayoutAlgorithm2D()
Create a new layout algorithmBaseLayoutAlgorithm2D(java.util.function.Function<V,Point2D> initializer)
Create a new layout algorithm with an initializer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Function<V,Point2D>
getInitializer()
Get the initializerprotected void
init(Graph<V,E> graph, LayoutModel2D<V> model)
Initialize a model using the initializer.void
setInitializer(java.util.function.Function<V,Point2D> initializer)
Set the initializer-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.alg.drawing.LayoutAlgorithm2D
layout
-
-
-
-
Method Detail
-
getInitializer
public java.util.function.Function<V,Point2D> getInitializer()
Get the initializer- Returns:
- the initializer
-
setInitializer
public void setInitializer(java.util.function.Function<V,Point2D> initializer)
Set the initializer- Parameters:
initializer
- the initializer
-
init
protected void init(Graph<V,E> graph, LayoutModel2D<V> model)
Initialize a model using the initializer.- Parameters:
graph
- the graphmodel
- the model
-
-