| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.ConstraintIncrementalLayerer
public class ConstraintIncrementalLayerer
This class is a Layerer implementation that observes relative and absolute layering constraints defined by 
 the layer constraint factory.
 Furthermore, it can handle the edge directedness as specified by DataProvider key
 IncrementalHierarchicLayouter.EDGE_DIRECTEDNESS_DPKEY.
 
   For a given graph instance, the layer constraint factory can be created using method
   IncrementalHierarchicLayouter.createLayerConstraintFactory(y.base.Graph). The 
   Layerer can be used for both common layering and layering of incremental nodes.
 
   
   Sample output of applying ConstraintIncrementalLayerer. The red colored node should reside in the topmost layer,
   blue nodes in the medium layer while green nodes in the bottommost layer.
 
   
   Sample output of applying ConstraintIncrementalLayerer on a graph with a PartitionGrid. Same colors
   represent nodes that belong to the same partition grid cell and should be layered with respect to the partition grid
   cell to which they belong.
 
Layerer is always applied automatically if the graph instance has constraints created with the 
 layering constraint factory.LayerConstraintFactory, 
IncrementalHierarchicLayouter| Field Summary | |
|---|---|
| static java.lang.String | EDGE_WEIGHTS_DPKEYA DataProviderkey for assigning additional edge weights
 
   TheLayerertries to maintain edges with higher weights short. | 
| Constructor Summary | |
|---|---|
| ConstraintIncrementalLayerer(Layerer coreLayerer)Creates a new ConstraintIncrementalLayererwith the givenLayererinstance as its core layerer. | |
| Method Summary | |
|---|---|
|  void | assignLayers(LayoutGraph graph,
             Layers layers,
             LayoutDataProvider ldp)Assigns all nodes of the graph to layers and adds them to the Layersinstance based on relative and
 absolute layering constraints defined by the given layering constraints. | 
| protected  void | checkConstraints()Checks if the current setting of constraints is consistent, that is, the induced constraint graph has no cycles. | 
|  long | getMaximalDuration()Returns the time limit in milliseconds set for the algorithm. | 
|  boolean | isAllowSameLayerEdges()Returns whether or not same-layer edges can be created by this Layererinstance. | 
|  void | setAllowSameLayerEdges(boolean allowSameLayerEdges)Specifies whether or not same-layer edges can be created by this Layererinstance. | 
|  void | setMaximalDuration(long maximalDuration)Specifies the time limit in milliseconds set for the algorithm. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String EDGE_WEIGHTS_DPKEY
DataProvider key for assigning additional edge weights
 
   The Layerer tries to maintain edges with higher weights short.
 
| Constructor Detail | 
|---|
public ConstraintIncrementalLayerer(Layerer coreLayerer)
ConstraintIncrementalLayerer with the given Layerer instance as its core layerer.
coreLayerer - the core Layerer instance
java.lang.IllegalArgumentException - if the given core layerer is null| Method Detail | 
|---|
public boolean isAllowSameLayerEdges()
Layerer instance.
 This only concerns edges between nodes that have no hard constraints that will force a same-layer edge (i.e. a same-layer constraint).
true if same-layer edges can be created, false otherwisepublic void setAllowSameLayerEdges(boolean allowSameLayerEdges)
Layerer instance.
 This only concerns edges between nodes that have no hard constraints that will force a same-layer edge (i.e. a same-layer constraint).
Layerer instance.allowSameLayerEdges - true if same-layer edges can be created, false otherwisepublic long getMaximalDuration()
   Values have to be greater than or equal to 0.
 
setMaximalDuration(long)public void setMaximalDuration(long maximalDuration)
   Values have to be greater than or equal to 0.
 
Long.MAX_VALUE.  The layout algorithm runs unrestricted.maximalDuration - a non-negative value that specifies the time limit
java.lang.IllegalArgumentException - if the maximum duration is negative
public void assignLayers(LayoutGraph graph,
                         Layers layers,
                         LayoutDataProvider ldp)
Layers instance based on relative and
 absolute layering constraints defined by the given layering constraints.
assignLayers in interface LayererLayers structure will be filled by the Layerer. If the Layerer instance is 
         used for layering incremental nodes, the Layers structure already has to contain all
         non-incremental nodes.graph - the input graphlayers - the Layers instance that will be filled with the results of the calculationldp - the LayoutDataProvider used for query information about the nodes and edgesLayers.insert(byte, int), 
Layer.add(y.base.Node)protected void checkConstraints()
java.lang.IllegalArgumentException - if the constraint graph is inconsistent| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||