| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LayerConstraintFactory
This interface provides methods for creating layering constraints.
DataProvider with the graph with key Layouter.NODE_ID_DPKEY,
 you must use the corresponding node IDs stored in this DataProvider as arguments for all methods
 that create a constraint. Otherwise, you can just use the node instances themselves.|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now have their intended placement. | 
| Field Summary | |
|---|---|
| static java.lang.Object | LAYER_CONSTRAINTS_MEMENTO_DPKEYA DataProviderkey for storing the constraint graph | 
| Method Summary | |
|---|---|
|  LayerConstraint | addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                            java.lang.Object aboveId)Adds a constraint that forces the Nodewith IDaboveIdto lie above theNodewith IDreferenceId. | 
|  LayerConstraint | addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                            java.lang.Object aboveId,
                            int minDistance)Adds a constraint that forces the Nodewith IDaboveIdto lie at leastminDistancelayers above theNodewith IDreferenceId. | 
|  LayerConstraint | addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                            java.lang.Object aboveId,
                            int minDistance,
                            int weight)Adds a constraint that forces the Nodewith IDaboveIdto lie at leastminDistancelayers above theNodewith IDreferenceIdwith a given 
 weight penalty for larger layer differences. | 
|  LayerConstraint | addPlaceNodeAtBottomConstraint(java.lang.Object nodeId)Adds a constraint that places a Nodeon the bottom layer. | 
|  LayerConstraint | addPlaceNodeAtTopConstraint(java.lang.Object nodeId)Adds a constraint that places a Nodeon the topmost layer. | 
|  LayerConstraint | addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                            java.lang.Object belowId)Adds a constraint that forces a Nodewith IDbelowIdto lie below theNodewith IDreferenceId. | 
|  LayerConstraint | addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                            java.lang.Object belowId,
                            int minDistance)Add a constraint that forces the Nodewith IDbelowIdto lie at leastminDistancelayers below theNodewith IDreferenceId. | 
|  LayerConstraint | addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                            java.lang.Object belowId,
                            int minDistance,
                            int weight)Adds a constraint that forces the Nodewith IDbelowIdto lie at leastminDistancelayers below theNodewith IDreferenceIdwith a given weight 
 penalty for larger layer differences. | 
|  LayerConstraint | addPlaceNodeInSameLayerConstraint(java.lang.Object referenceId,
                                  java.lang.Object sameLayerId)Adds a constraint that forces the Nodewith IDsameLayerIdto lie in the same layer 
 as theNodewith IDreferenceId. | 
|  void | dispose()Disposes this factory. | 
|  java.lang.Object | getMemento()Returns a token that allows to bind a constraint factory to a graph instance after creation. | 
|  void | removeConstraints(java.lang.Object nodeId)Clears all constraints for a given Node. | 
| Field Detail | 
|---|
static final java.lang.Object LAYER_CONSTRAINTS_MEMENTO_DPKEY
DataProvider key for storing the constraint graph
| Method Detail | 
|---|
java.lang.Object getMemento()
This method should only be used if the constraint factory is not bound to a graph instance initially. It allows to bind this factory to a graph instance after creation. See the factory methods that create instances of this interface for a description.
IncrementalHierarchicLayouter.createLayerConstraintFactory(y.base.Graph)void dispose()
This method should be called when this factory is not needed anymore, i.e. after the layout has been calculated. Calling this method also clears all constraints.
LayerConstraint addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                                            java.lang.Object belowId)
Node with ID belowId to lie below the Node 
 with ID referenceId.
referenceId - the ID of the reference nodebelowId - the ID of the node that should lie below
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie below the reference node. | 
LayerConstraint addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                                            java.lang.Object belowId,
                                            int minDistance)
Node with ID belowId to lie at least 
 minDistance layers below the Node with ID referenceId.
 
   The minimum distance includes potentially empty layers that are removed by the Layerer instance. In that 
   case, the actual layer difference may be smaller than the minimum distance.
 
referenceId - the ID of the reference nodebelowId - the ID of the node that should lie belowminDistance - the minimum layer distance between the node and its reference node
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie below the reference node. | 
LayerConstraint addPlaceNodeBelowConstraint(java.lang.Object referenceId,
                                            java.lang.Object belowId,
                                            int minDistance,
                                            int weight)
Node with ID belowId to lie at least 
 minDistance layers below the Node with ID referenceId with a given weight 
 penalty for larger layer differences.
 
   The minimum distance includes potentially empty layers that are removed by the Layerer instance. In that 
   case, the actual layer difference may be smaller than the minimum distance.
 
referenceId - the ID of the reference nodebelowId - the ID of the node that should lie belowminDistance - the minimum layer distance between the node and its reference nodeweight - the weight penalty for larger layer differences
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie below the reference node. | 
LayerConstraint addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                                            java.lang.Object aboveId)
Node with ID aboveId to lie above the 
 Node with ID referenceId.
referenceId - the ID of the reference nodeaboveId - the ID of the node that should lie above
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie above the reference node. | 
LayerConstraint addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                                            java.lang.Object aboveId,
                                            int minDistance)
Node with ID aboveId to lie at least 
 minDistance layers above the Node with ID referenceId.
 
   The minimum distance includes potentially empty layers that are removed by the Layerer instance. In that 
   case, the actual layer difference may be smaller than the minimum distance.
 
referenceId - the ID of the reference nodeaboveId - the ID of the node that should lie aboveminDistance - the minimum layer distance between the node and its reference node
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie above the reference node. | 
LayerConstraint addPlaceNodeAboveConstraint(java.lang.Object referenceId,
                                            java.lang.Object aboveId,
                                            int minDistance,
                                            int weight)
Node with ID aboveId to lie at least 
 minDistance layers above the Node with ID referenceId with a given 
 weight penalty for larger layer differences.
 
   The minimum distance includes potentially empty layers that are removed by the Layerer instance. In that 
   case, the actual layer difference may be smaller than the minimum distance.
 
referenceId - the ID of the reference nodeaboveId - the ID of the node that should lie aboveminDistance - the minimum layer distance between the node and its reference nodeweight - the weight penalty for larger layer differences
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie above the reference node. | 
LayerConstraint addPlaceNodeInSameLayerConstraint(java.lang.Object referenceId,
                                                  java.lang.Object sameLayerId)
Node with ID sameLayerId to lie in the same layer 
 as the Node with ID referenceId.
referenceId - the ID of the reference nodesameLayerId - the ID of the node that should lie in the same layer
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie in the same layer as the reference node. | 
LayerConstraint addPlaceNodeAtTopConstraint(java.lang.Object nodeId)
Node on the topmost layer.
nodeId - the ID of the node that should lie on the top layer
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie in the first layer. | 
LayerConstraint addPlaceNodeAtBottomConstraint(java.lang.Object nodeId)
Node on the bottom layer.
nodeId - the ID of the node that should lie on the bottom layer
LayerConstraint object that represents the constraintLayerConstraint|  A graph laid out with IncrementalHierarchicLayouterwith default settings. The labels indicate the desired placement of certain nodes relative to a reference node. |  After defining appropriate layer constraints and running the layout again, the labeled nodes now lie in the last layer. | 
void removeConstraints(java.lang.Object nodeId)
Node.
nodeId - the ID of the node for which all constraints should be clearedLayerConstraint| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||