ibm_ilog.graphlayout.INodeSideFilter (version 1.1-SNAPSHOT)
An interface used to define complex requirements concerning the connection of the links to the different sides of the nodes.
The filter is used by some layout algorithms to provide the user the capability to allow or prohibit the links to be connected on given sides (top/bottom/right/left) of the nodes.
Method Summary
- accept(graphModel, link, origin, node, side) Allows or prohibits the connection of 'link' on a given side of the 'node'.
Methods
Allows or prohibits the connection of link
on a given
side of the node
.
Returns true
when the specified end of
link
can be connected on node
on the side
defined by the argument side
. Returns
false
otherwise.
The values for side
are defined in
ibm_ilog.graphlayout.Direction
. Valid values are
Top
, Bottom
, Left
, and
Right
.
This method is called by those layout algorithms that allow you to specify a node side filter. You can implement this method in order to define complex requirements concerning the connection of the links to the different sides of nodes. For example, if you want all links to be connected to any side except the top side of the nodes, you could use:
return (side != ibm_ilog.graphlayout.Direction.TOP);
Parameter | Type | Description |
---|---|---|
graphModel | ibm_ilog.graphlayout.AbstractGraphLayoutModel | The graph model to which the node belongs. |
link | Object | The link to be connected to the node. |
origin | Boolean | If 'origin' is 'true', the method determines whether the link origin can be connected. Otherwise, the method determines whether the link destination can be connected. |
node | Object | The node. |
side | int | The side of the node. The values are defined in ' ibm_ilog.graphlayout.Direction'. Valid values are 'Top', 'Bottom', 'Left', and 'Right' . |