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.INodeSideFilter

Object » ibm_ilog.graphlayout.INodeSideFilter
dojo.require("ibm_ilog.graphlayout.INodeSideFilter");

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

accept
'true' if the connection is allowed and 'false' otherwise.

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);

ParameterTypeDescription
graphModelibm_ilog.graphlayout.AbstractGraphLayoutModelThe graph model to which the node belongs.
linkObjectThe link to be connected to the node.
originBooleanIf 'origin' is 'true', the method determines whether the link origin can be connected. Otherwise, the method determines whether the link destination can be connected.
nodeObjectThe node.
sideintThe side of the node. The values are defined in ' ibm_ilog.graphlayout.Direction'. Valid values are 'Top', 'Bottom', 'Left', and 'Right' .