IBM ILOG Dojo Diagrammer 1.1.1 API Documentation
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

ibm_ilog.graphlayout.hierarchical.HierarchicalRelativeLevelConstraint

Object » ibm_ilog.graphlayout.hierarchical.HierarchicalConstraint » ibm_ilog.graphlayout.hierarchical.HierarchicalRelativeConstraint » ibm_ilog.graphlayout.hierarchical.HierarchicalRelativeLevelConstraint
dojo.require("ibm_ilog.graphlayout.hierarchical.HierarchicalRelativeLevelConstraint");

The class RelativeLevelConstraint is a constraint to place a node relative to another node. It forces a node to be placed at a level with higher index than another node. The constraint can also be applied to groups of nodes.

Nodes are organized in horizontal or vertical levels numbered from 0 to "n". If the link flow direction is from top to bottom, the nodes with level index 0 are placed in the topmost level, and the nodes with higher level indexes are placed in the levels below. If the link flow direction is from left to right, the nodes with level index 0 are placed in the leftmost level, and the nodes with higher level indexes are placed in the levels farther to the right.

The constraint is evaluated, if the incremental mode is disabled. If the incremental mode is enabled, the constraint is only evaluated for those nodes that are marked for incremental recalculation, because otherwise, the incremental positions of the nodes are dominant.

Among the constraints, this kind is dominated by level range constraints, that is, if the level range for node A is below the level range of node B, then A cannot be forced to be placed in a higher level than B. This kind of constraint is also dominated by the same level constraints, that is, if both nodes A and B are forced to be at the same level, then A cannot be forced to be placed in a higher level than B.

The relative constraints have priorities. Conflicting relative level constraints are resolved by removing the constraint with the smallest priority. Relative level constraints also compete with the links of the graph. Each link acts like a constraint (with the same priority as the link) that forces that the target node is placed in a higher level than the source node.

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.

In recursive layout mode (see HierarchicalLayout.setRecursiveLayoutMode()), both nodes of the relative 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 relative level constraint containing nodes of different subgraphs.

Method Summary

  • constructor(a0, a1, a2)
  • copy() returns ibm_ilog.graphlayout.hierarchical.HierarchicalConstraint Copies the constraint.
  • getHigherSubject() returns Object Returns the subject of this constraint that is placed at the levels with higher index than the other subject.
  • getLowerSubject() returns Object Returns the subject of this constraint that is placed at the levels with lower index than the other subject.

Methods

copy
Returns ibm_ilog.graphlayout.hierarchical.HierarchicalConstraint

Copies the constraint.

getHigherSubject
Returns Object

Returns the subject of this constraint that is placed at the levels with higher index than the other subject. The subject is either the constraint node, or the instance of HierarchicalNodeGroup that describes a group of nodes.

getLowerSubject
Returns Object

Returns the subject of this constraint that is placed at the levels with lower index than the other subject. The subject is either the constraint node, or the instance of HierarchicalNodeGroup that describes a group of nodes.