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

ibm_ilog.diagram.util.GraphUtil

Object » ibm_ilog.diagram.util.GraphUtil

Method Summary

Methods

allGraphElements
ParameterTypeDescription
roots
result
applyStyle
ParameterTypeDescription
shape
style
countNodes
ParameterTypeDescription
g
dispatchClass
ParameterTypeDescription
ge
args
context
handlers
doAncestors
ParameterTypeDescription
shape
cb
scope
fold

Recurses a Graphic offering callbacks to the user at each structural joint. In addition to the standard folder functions for each kind of entity, this function supports a state that is built forward on composite nodes [ for processing root-to-leaf instead of only folding leaf-to-root ]. Also, it allows optionally to stop the recursion at the level of collapsed subgraphs, which are treated as a node. types: G == Graphic FG == folded graphic FC == folded child collection ST == forward-built state

ParameterTypeDescription
eGThe Graphic to recurse
psSTthe initial parent state
foldersgraph:function( ST, ST, G, FG ){ return FG; }, Fold a Graph group: function( ST, ST, G, FG ){ return FG; }, Fold a Group sub: function( ST, ST, G, FG ){ return FG; }, Fold a Subgraph (receives folded inner Graph) node: function( ST, G ){ return FG; }, Fold a Node link: function( ST, G ){ return FG; }, Fold a Group node other: function( ST, G ){ return FG; }, Fold an unknown node (eventual gfx.Rects, etc.) child: function( ST, FC, FG ){ return FC; }, Fold a folded Graphic FG into a folded child-collection FC, returning the new collection cBase: FC The initially empty folded child collection (constant) accSubgraph: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G accGraph: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G accGroup: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G }
scope
stopRecursionAtCollapsedSubIftrue, the recursion stops at the level of collapsed subgraphs, which are treated as a node. NOTE: unstable API
foldGraphModel

Recurses a graph layout model offering callbacks to the user at each structural joint. In addition to the standard folder functions for each kind of entity, this function supports a state that is built forward on composite nodes [ for processing root-to-leaf instead of only folding leaf-to-root ]. Also, it allows optionally to stop the recursion at the level of collapsed subgraphs, which are treated as a node. types: G == Graph layout model (subclass of ibm_ilog.graphlayout.AbstractGraphLayoutModel) FG == folded graph layout model FC == folded child collection ST == forward-built state

ParameterTypeDescription
eGThe graph layout model (subclass of ibm_ilog.graphlayout.AbstractGraphLayoutModel) to recurse
psSTthe initial parent state
foldersgraph:function( ST, ST, G, FG ){ return FG; }, Fold a graph layout model (ibm_ilog.graphlayout.AbstractGraphLayoutModel) group: function( ST, ST, G, FG ){ return FG; }, Fold a Group sub: function( ST, ST, G, FG ){ return FG; }, Fold a Subgraph (receives folded inner Graph) node: function( ST, G ){ return FG; }, Fold a Node link: function( ST, G ){ return FG; }, Fold a Group node other: function( ST, G ){ return FG; }, Fold an unknown node (eventual gfx.Rects, etc.) child: function( ST, FC, FG ){ return FC; }, Fold a folded AbstractGraphLayoutModel FG into a folded child-collection FC, returning the new collection cBase: FC The initially empty folded child collection (constant) accSubgraph: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G accGraph: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G accGroup: function( ST, G ){ return ST; } The forward-state accumulator, builds a new ST given a newly encountered G }
scope
stopRecursionAtCollapsedSubIftrue, the recursion stops at the level of collapsed subgraphs, which are treated as a node. NOTE: unstable API
folders
ParameterTypeDescription
kwArgs
forEach
ParameterTypeDescription
ge
f
scope
getOwningSubgraph
ParameterTypeDescription
ge
getSurface
ParameterTypeDescription
ge
isContainedBy
ParameterTypeDescription
element
container
isStableVisible
true of the graph element is visible in the surface
ParameterTypeDescription
ge
logXml
ParameterTypeDescription
g
lowestCommonAncestor
maximals
Returns only the maximal containers for an array of graph elements s: Array the array of graph elements
ParameterTypeDescription
gs
safeGetParent
ParameterTypeDescription
ge