Class EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T extends EdgeAwareTreeLayoutAlgorithm<V,E>,B extends EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T,B>>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm.Builder<V,T,B>
-
- org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm.Builder<V,T,B>
-
- org.jungrapht.visualization.layout.algorithms.TreeLayoutAlgorithm.Builder<V,T,B>
-
- org.jungrapht.visualization.layout.algorithms.EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T,B>
-
- Type Parameters:
V- the vertex typeE- the edge typeT- the type that is builtB- the builder type
- All Implemented Interfaces:
EdgeAwareLayoutAlgorithm.Builder<V,E,T,B>,LayoutAlgorithm.Builder<V,T,B>
- Direct Known Subclasses:
RadialEdgeAwareTreeLayoutAlgorithm.Builder
- Enclosing class:
- EdgeAwareTreeLayoutAlgorithm<V,E>
public static class EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T extends EdgeAwareTreeLayoutAlgorithm<V,E>,B extends EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T,B>> extends TreeLayoutAlgorithm.Builder<V,T,B> implements EdgeAwareLayoutAlgorithm.Builder<V,E,T,B>
a Builder to create a configured instance of an EdgeAwareTreeLayoutAlgorithm
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanalignFavoredEdgesprotected Comparator<E>edgeComparatorprotected Predicate<E>edgePredicateprotected Comparator<V>vertexComparatorprotected Predicate<V>vertexPredicate-
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm.Builder
correctOverlap, expandLayout, horizontalVertexSpacing, rootComparator, rootPredicate, vertexBoundsFunction, verticalVertexSpacing
-
Fields inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm.Builder
after
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BalignFavoredEdges(boolean alignFavoredEdges)Tbuild()BedgeComparator(Comparator<E> edgeComparator)BedgePredicate(Predicate<E> edgePredicate)protected Bself()BvertexComparator(Comparator<V> vertexComparator)BvertexPredicate(Predicate<V> vertexPredicate)-
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractTreeLayoutAlgorithm.Builder
correctOverlap, expandLayout, horizontalVertexSpacing, rootComparator, rootPredicate, vertexBoundsFunction, verticalVertexSpacing
-
Methods inherited from class org.jungrapht.visualization.layout.algorithms.AbstractLayoutAlgorithm.Builder
after
-
-
-
-
Field Detail
-
vertexComparator
protected Comparator<V> vertexComparator
-
edgeComparator
protected Comparator<E> edgeComparator
-
alignFavoredEdges
protected boolean alignFavoredEdges
-
-
Method Detail
-
self
protected B self()
- Overrides:
selfin classAbstractTreeLayoutAlgorithm.Builder<V,T extends EdgeAwareTreeLayoutAlgorithm<V,E>,B extends EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T,B>>- Returns:
- this builder cast to type B
-
vertexPredicate
public B vertexPredicate(Predicate<V> vertexPredicate)
- Parameters:
vertexPredicate-Predicateto apply to vertices- Returns:
- this Builder
-
edgePredicate
public B edgePredicate(Predicate<E> edgePredicate)
- Parameters:
edgePredicate-Predicateto apply to edges- Returns:
- this Builder
-
vertexComparator
public B vertexComparator(Comparator<V> vertexComparator)
- Parameters:
vertexComparator-Comparatorto sort vertices- Returns:
- this Builder
-
edgeComparator
public B edgeComparator(Comparator<E> edgeComparator)
- Parameters:
edgeComparator-Comparatorto sort edges- Returns:
- this Builder
-
alignFavoredEdges
public B alignFavoredEdges(boolean alignFavoredEdges)
-
build
public T build()
- Specified by:
buildin interfaceLayoutAlgorithm.Builder<V,E,T extends EdgeAwareTreeLayoutAlgorithm<V,E>>- Overrides:
buildin classTreeLayoutAlgorithm.Builder<V,T extends EdgeAwareTreeLayoutAlgorithm<V,E>,B extends EdgeAwareTreeLayoutAlgorithm.Builder<V,E,T,B>>- Returns:
- the Builder with its set parameters
-
-