ibm_ilog.graphlayout.hierarchical.HierarchicalSameLevelConstraint
The class SameLevelConstraint
is a constraint that
forces two nodes to be placed at the same level.
The constraint is evaluated, if the incremental mode is disabled. If the incremental mode is enabled, the constraint is only evaluated if at least one of the nodes is marked for incremental recalculation, because otherwise, the incremental positions of the nodes are dominant.
Among the constraints, this kind has the highest priority. If several conflicting constraints are specified (such as the node must be placed in a lower level than another node and at the same level as this other node), the constraints with lower priority are ignored during layout.
The automatic conflict resolution can handle conflicting constraints. However, to speedup the layout, it is recommended to specify constraints in a way such that there are no conflicts.
The same level constraint has the same priority as the group spread constraint, because both cannot be conflicting. In fact, there are two ways of forcing two nodes to the same level: use the same level constraint, or use a group spread constraint of a group of two nodes with spread size 0.
In recursive layout mode (see
HierarchicalLayout.setRecursiveLayoutMode()
), both nodes of
the same level constraint must belong to the same subgraph, and the
constraint must be installed at the layout instance that is attached
to this subgraph. It is not possible to have a same level constraint
containing nodes of different subgraphs.
Property Summary
Method Summary
- actAfterAdd(manager) Acts after the constraint was added to the constraint manager.
- constructor(a0, a1)
- copy() returns ibm_ilog.graphlayout.hierarchical.HierarchicalConstraint Copies the constraint.
- getFirstNode() returns Object Returns the first node of this constraint.
- getPriority() returns Number Returns the priority of the constraint.
- getSecondNode() returns Object Returns the second node of this constraint.
- setPriority(priority) Sets the priority of the constraint.
- validate(model) Returns <tt>true</tt> if the constraint is valid in the input graph model.
- validateForLayout(graph) Sets the valid flag of the constraint during layout.
Properties
Methods
Parameter | Type | Description |
---|---|---|
manager |
Parameter | Type | Description |
---|---|---|
a0 | ||
a1 |
Copies the constraint.
Returns the priority of the constraint.
If there are conflicts between constraints, the constraint with the highest priority wins.
Sets the priority of the constraint. If there are conflicts between constraints, the constraint with the highest priority wins.
Parameter | Type | Description |
---|---|---|
priority |
Parameter | Type | Description |
---|---|---|
model |
Sets the valid flag of the constraint during layout.
The purpose is the same as validate, but this is used temporarily
during layout while HierarchicalConstraint.validate()
is used to remove invalid constraints completely.
Parameter | Type | Description |
---|---|---|
graph |