ibm_ilog.diagram.util.GraphUtil (version 1.1-SNAPSHOT)
Method Summary
- allGraphElements(roots, result)
- applyStyle(shape, style)
- countNodes(g)
- dispatchClass(ge, args, context, handlers)
- doAncestors(shape, cb, scope)
- fold(e, ps, folders, scope, stopRecursionAtCollapsedSub) Graph data structure fold function. --Functional Programming--
- foldGraphModel(e, ps, folders, scope, stopRecursionAtCollapsedSub) Graph model data structure fold function. --Functional Programming--
- folders(kwArgs)
- forEach(ge, f, scope)
- getOwningSubgraph(ge)
- getSurface(ge)
- isContainedBy(element, container)
- isStableVisible(ge)
- logXml(g)
- lowestCommonAncestor()
- maximals(gs) Returns only the maximal containers for an array of graph elements s: Array the array of graph elements
- safeGetParent(ge)
Methods
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
Parameter | Type | Description |
---|---|---|
e | G | The Graphic to recurse |
ps | ST | the initial parent state |
folders | graph: | 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 | ||
stopRecursionAtCollapsedSub | If | true, the recursion stops at the level of collapsed subgraphs, which are treated as a node. NOTE: unstable API |
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
Parameter | Type | Description |
---|---|---|
e | G | The graph layout model (subclass of ibm_ilog.graphlayout.AbstractGraphLayoutModel) to recurse |
ps | ST | the initial parent state |
folders | graph: | 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 | ||
stopRecursionAtCollapsedSub | If | true, the recursion stops at the level of collapsed subgraphs, which are treated as a node. NOTE: unstable API |
Parameter | Type | Description |
---|---|---|
gs |