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

ibm_ilog.graphlayout.hierarchical.HierarchicalSameLevelConstraint (version 1.1-SNAPSHOT)

Object » ibm_ilog.graphlayout.hierarchical.HierarchicalConstraint » ibm_ilog.graphlayout.hierarchical.HierarchicalSameLevelConstraint
dojo.require("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

actAfterAdd
Acts after the constraint was added to the constraint manager.
ParameterTypeDescription
manager
constructor
ParameterTypeDescription
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.

If there are conflicts between constraints, the constraint with the highest priority wins.

getSecondNode
Returns Object
Returns the second node of this constraint.
setPriority

Sets the priority of the constraint. If there are conflicts between constraints, the constraint with the highest priority wins.

ParameterTypeDescription
priority
validate
Returns <tt>true</tt> if the constraint is valid in the input graph model.
ParameterTypeDescription
model
validateForLayout

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.

ParameterTypeDescription
graph