Properties
Methods
Defined by dojox.gfx.Group
this method should be called on every dojo.connect done to the graph element that
should be disconnected on dispose.
Parameter | Type | Description |
---|
connection | | |
Adds a port to this node.
Parameter | Type | Description |
---|
port | ibm_ilog.diagram.PortBase | ibm_ilog.diagram.PortBase: The port to add. |
Defined by dojox.gfx.Group
This function free all possible listeners
Parameter | Type | Description |
---|
graphElement | | |
Called if automaticHierarchicalLayout is set to false after a Hierarchical layout
is performed on the graph. This method should perform a custom layout on the swim lanes.
Parameter | Type | Description |
---|
graph | ibm_ilog.diagram.Graph | The toplevel graph on which the layout is performed. |
hl | ibm_ilog.graphlayout.hierarchical.HierarchicalLayout | The hierarchical layout that is being performed. |
swimlanes | Array | The array of SwimLane obejcts that was returned by beforeHierarchicalLayout. |
Parameter | Type | Description |
---|
rect | | |
Applies the specified template on this subgraph.
Parameter | Type | Description |
---|
template | String||Object | |
context | Object||ibm_ilog.diagram.data.dtlbinding.BoundContext | |
Defined by dojox.gfx.Group
This function is called before disposing the GraphElement
Parameter | Type | Description |
---|
graphElement | | |
Returns Array: An array of Swimlane objects that will be passed back to afterHierarchicalLayout.
Called if automaticHierarchicalLayout is set to false before a Hierarchical layout
is performed on the graph. This method must return an array of swim lanes, that will
be passed back to afterHierarchicalLayout.
Parameter | Type | Description |
---|
graph | ibm_ilog.diagram.Graph | The toplevel graph on which the layout is performed. |
hl | ibm_ilog.graphlayout.hierarchical.HierarchicalLayout | The hierarchical layout that is being performed. |
Defined by dojox.gfx.Group
Returns the GraphElement that contains the specified shape, or null.
Parameter | Type | Description |
---|
shape | | |
Returns Boolean: True if this SwimLane is not nested, false if it is nested.
Indicates if this Subgraph can be collapsed.
This method always returns true for the Subgraph class,
it can be overridden in subclasses that do not support collapsing.
Defined by dojox.gfx.Group
override gfx.connect to add the handle to the internal list
Defined by dojox.gfx.Group
This function is disconnect every dojo.connect attached to this element
This function should be called when the GraphElement is completely deleted, that is, when it is removed
from its parent graph and it will never be used again.
Parameter | Type | Description |
---|
options | options.noRecurse: | Do not recurse children |
Returns whether the expand/collapse operation is animated.
The base shape for various purposes, for example links will typically
be connected to the base shape instead of the overall bounding rectangle of the node.
By default, the base shape is the shape contained in the node template
whose dojoAttachPoint property is set to "baseShape". In the default template,
this is a rounded rectangle. If not baseshape exists in the template, the
Node itself is returned.
A rectangle (i.e. an object with x/y/width/height properties) containing
the bounds of the node in the specified coordinate space.
Returns the bounds of this node in the coordinate space of the specified parent.
Parameter | Type | Description |
---|
parent | dojox.gfx.Group | The parent object that determines the coordinate space
the bounds are relative to. If null or undefined, the bounds of the node
relative to its parent are returned. |
When a subgraph is collapsed, intergraph links connected to nodes contained in the subgraph
are automatically reconnected to a port of the collapsed subgraph itself.
This method lets you customize which port will be used for this.
If this method returns null (the default), an AutomaticPort will be used by default.
Parameter | Type | Description |
---|
link | ibm_ilog.diagram.Link: | The intergraph link connected to a node contained in this subgraph. |
port | ibm_ilog.diagram.PortBase: | The port to which the intergraph link is normally connected when this subgraph is expanded. |
An object with 'x' and 'y' properties representing a ratio (between 0 and 1) of the subgraph width/height.
Gets the fixed position used to realign the subgraph when it is expanded/collapsed.
ibm_ilog.diagram.Graph
The Graph object contained in this Subgraph.
Gets the nested graph contained in this Subgraph.
Defined by dojox.gfx.Group
return all the intergraph links
return array of ibm_ilog.diagram.Link
Returns Array: An array of ibm_ilog.diagram.Link objects.
If starting is not false, the method returns all the links whose start nodes are this node.
If ending is not false, the method returns all the links whose end nodes are this node.
Parameter | Type | Description |
---|
starting | Boolean: | If this argument is not false (e.g., true or undefined), links whose start nodes are equal to this node are returned. |
ending | Boolean: | If this argument is not false (e.g., true or undefined), links whose end nodes are equal to this node are returned. |
Example 1
node.getLinks()
node.getLinks(true, true)
node.getLinks(true)
These 3 calls return all the links connected to the node.
Example 2
node.getLinks(true, false)
This call returns the links starting at the node.
Example 3
node.getLinks(false)
node.getLinks(false, true)
These 2 calls return the links ending at the node.
Example 4
node.getLinks(false, false)
This call always returns an empty array.
Returns true if this swim lane is a nested lane contained in another swim lane.
An array of PortBase objects.
Note that this method always returns a newly allocated array.
Gets the horizontal direction of the swim lane (see setRightToLeft()
.
Gets the sub-lane stacking mode (see setStackSublanes()
).
Gets the orientation of the swim lane (see setVertical
).
Parameter | Type | Description |
---|
p | | |
graph | | |
tolerance | | |
Boolean:
True if the subgraph is collapsed, or false if the subgraph is expanded.
Gets the collapsed state of this Subgraph.
Parameter | Type | Description |
---|
target | Object | |
forceDoLayout | | |
This function changes the node's transform so that the top-left of its bounds
(in the parent coordinate space) will be the specified 'x'and 'y' arguments
Parameter | Type | Description |
---|
x | number | |
y | number | |
parent | dojox.gfx.Group | |
propagate a new text direction to children (nodes, links)
Parameter | Type | Description |
---|
textdir | String | String, text direction |
Removes a port from this node.
Parameter | Type | Description |
---|
port | ibm_ilog.diagram.PortBase | ibm_ilog.diagram.PortBase: The port to remove. |
Sets whether the expand/collapse operation is animated. The default value is true.
Parameter | Type | Description |
---|
value | Boolean | Indicates whether the expand/collapse operation is animated. |
Changes the transform of this node so that its bounds will be a given rectangle,
in the coordinate space of the specified parent.
Parameter | Type | Description |
---|
rect | A | rectangle (i.e. an object with x/y/width/height properties) containing
the new bounds of the node in the specified coordinate space. |
parent | dojox.gfx.Group | The parent object that determines the coordinate space
the bounds are relative to. If null or undefined, the bounds of the node
relative to its parent are changed. |
Collapses or expands this subgraph.
Parameter | Type | Description |
---|
collapsed | Boolean | Boolean: If true, the subgraph is collapsed, otherwise it is expanded. |
animate | Boolean | If specified, indicates whether the expand/collapse operation is animated.
If this argument is not specified, the <code>getAnimate()</code> flag is used instead. |
Does nothing, Subgraphs cannot have an explicit size, their size is determined by their children.
Parameter | Type | Description |
---|
sz | | |
When a subgraph is expanded or collapsed, it is automatically realigned so that its position
in the new state (expanded or collapsed) matches the position in the previous state.
This method specifies how the subgraph will be realigned by defining a fixed position relative
to the subgraph width/height.
For example, setFixedPosition({x:0, y:0}) (the default value)
realigns the subgraph so that its top-left corner stays at the same position,
and setFixedPosition({x:0.5, y:0.5})
realigns the subgraph so that its center stays at the same position.
Parameter | Type | Description |
---|
position | An | object with 'x' and 'y' properties representing a ratio (between 0 and 1) of the subgraph width/height. |
Sets the horizontal direction of the swim lane.
This property has an effect only if isVertical()
is false
.
Parameter | Type | Description |
---|
rightToLeft | Boolean: | If <code>false</code>, the title of the swim lane will be displayed on the left of the graph.
If <code>rightToLeft</code> is <code>true</code>, the title of the swim lane
will be displayed on the right of the graph. |
Sets the sub-lane stacking mode.
Sub-lanes (that is, SwimLane
objects contained in this SwimLane
)
are stacked vertically if getVertical()
is false
, or
horizontally if getVertical()
is true
.
Parameter | Type | Description |
---|
stack | Boolean: | If <code>true</code>, sub-lanes will be stacked, otherwise they will be left to their
current position and size. |
Sets the orientation of the swim lane.
Parameter | Type | Description |
---|
vertical | Boolean: | If <code>true</code>, the title of the swim lane will be displayed at the top of the graph.
If <code>false</code>, the title of the swim lane will be displayed (vertically)
on the left (if <code>isRightToLeft()</code> is <code>false</code>) or
on the right (if <code>isRightToLeft()</code> is <code>true</code>)
of the graph. |
Defined by dojox.gfx.Group
Events
This event is called to signal that the bounds of the node have changed.
Called when the subgraph is about to be been expanded or collapsed.
Called when the subgraph has been expanded or collapsed.