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.editor.DiagramEditor

Object » ibm_ilog.diagram.widget._Diagram » ibm_ilog.diagram.widget.Diagram » ibm_ilog.diagram.editor.DiagramEditor
dojo.require("ibm_ilog.diagram.editor.DiagramEditor");

In addition to the services from Diagram, this widget includes the following services: - Can be a drag and drop target (look at samples/dnd/dnd.html) - Node/Subgraph resizing through adorners - Link creation and editing through adorners

Property Summary

  • adorners enable or disable adorners focus following mouse pointer
  • allowCreateLinkFunction This function is called to know if it is allowed to create a new link between two nodes return true by default. format: allowCreateLinkFunction(DiagramEditor, startNode, endNode)
  • allowCreateNodeFunction This function is called to know if it is allowed to create a new node return true by default. format: allowCreateNodeFunction(DiagramEditor, parentNode, childNode)
  • allowFreeLinks this value determine if the interactors can create free links
  • annotationsEnabled to disable annotations.
  • automaticLinkLayout
  • automaticNodeLayout
  • backMenu optional dijit.Menu for the diagram background (property)
  • centerOnLocation If true, the values provided by xBinding/yBinding atributes represent the center of the node. If false, the values provided by xBinding/yBinding atributes represent the top left-hand corner of the node.
  • childBinding A string that indicates either the data item field name defining the "child" relationship or a function name that returns the origin of a link for the specified data item. cast the value as a String
  • containerNode
  • createAnnotationAdornerFunction to specify what adorner to create for annotating the given GraphElement
  • createLinksForHierarchy If true, the hierarchy is rendered using nodes and links. If false, it is rendered using subgraphs and nodes
  • destroyAnnotationAdornerFunction to the createAnnotationAdornerFunction, this functions destroyed the previously created annotation.
  • disableGraphWai
  • disableInlineEditors
  • domNode
  • dropable
  • endNodeBinding A string that indicates either the data item field name defining the "end" of a link or a function name that returns the destination of a link for the specified data item. cast the value as a String and set the default as field with name of "end"
  • focus
  • getAssociatedLinkAdornersFunction function which must return the adorners associated with the adorner focus on the given link.
  • getAssociatedNodeAdornersFunction function which must return the adorners associated with the adorner focus on the given node.
  • getAssociatedSubgraphAdornersFunction function which must return the adorners associated with the adorner focus on the given subgraph.
  • getTooltipAroundPlacementFunction function used to compute the graph element bounding box used to compute the tooltip placement.
  • getTooltipContentFunction function used to build the tooltip content associated with the given graph element.
  • hasAnnotationFunction to specify when the adorner needs an annotation adorner created
  • hud Use to disable the entire viewport hud.
  • lastMenuEvent
  • lastMenuTarget entity on which the last/current menu was opened.
  • linkLayout
  • linkLayoutActive
  • linkMenu optional dijit.Menu for links (property)
  • linkStyle A dictionary of property-value pairs that define global properties to apply on links. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
  • linkTemplate A description object that defines the graphical representation of links.
  • linksGraphBinding A string that indicates either the data item field name defining the "link graphic data" associated with a linksStore data item or a named function that returns the "link graphic data" associated with a linksStore data item. cast the value as a String
  • linksGraphProperties A comma-separated list of properties to save if linksGraphBinding is specified.
  • linksQuery An object providing the query criteria for the links datas store. cast the value as a String
  • linksQueryOptions An object containing additional options for the links query. cast the value as an Object
  • linksStore A data store that provides data item to be represented as Links when the nodes relationship cannot be implicitly deducted from the nodes store data structure. Must implement at least the dojo.data.api.Read and dojo.data.api.Identity interfaces.
  • loadAnnotationsFunction to create the annotations already associated with data already present in the ge.
  • marquee enable or disable marquee selection
  • move enable or disable moving entities (true by default at DiagramEditor)
  • nodeLayout
  • nodeLayoutActive
  • nodeMenu optional dijit.Menu for nodes (property)
  • nodeStyle A dictionary of property-value pairs that define global properties to apply on nodes. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
  • nodeTemplate A description object that defines the graphical representation of nodes.
  • nodesGraphBinding A string that indicates either the data item field name defining the "node graphic data" associated with a nodeStore data item or a named function that returns the "node graphic data" associated with a linksStore data item. cast the value as a String
  • nodesGraphProperties A comma-separated list of properties to save if nodesGraphBinding is specified.
  • nodesQuery
  • nodesQueryOptions An object containing additional options for the node query. cast the value as an Object
  • nodesStore A data store that provides data item to be represented as Nodes. Must implement at least the dojo.data.api.Read and dojo.data.api.Identity interfaces.
  • onDropFunction This function is called on diagram drop action format: DropFunction(droppedItem,point,Diagram,overElements,undoAction)
  • onDropTemplateFunction this function is called to determine the template on drop action format: DropTemplateFunction(droppedItem,dataItem,diagram)
  • onLinkClick
  • onLinkDblClick
  • onLinkMouseDown
  • onLinkMouseEnter
  • onLinkMouseLeave
  • onLinkMouseMove
  • onLinkMouseOut
  • onLinkMouseOver
  • onLinkMouseUp
  • onNodeClick
  • onNodeDblClick
  • onNodeMouseDown
  • onNodeMouseEnter
  • onNodeMouseLeave
  • onNodeMouseMove
  • onNodeMouseOut
  • onNodeMouseOver
  • onNodeMouseUp
  • onSubgraphClick
  • onSubgraphDblClick
  • onSubgraphMouseDown
  • onSubgraphMouseEnter
  • onSubgraphMouseLeave
  • onSubgraphMouseMove
  • onSubgraphMouseOut
  • onSubgraphMouseOver
  • onSubgraphMouseUp
  • overview Use the embedded overview hud component
  • overviewPan Activate or deactivate panning in the hud overview
  • overviewRenderer Use renderer used in the embedded overview
  • overviewSize The size of the embedded Overview
  • overviewZoom Activate or deactivate panning in the hud overview
  • pan enable or disable panning if clicking on shapes.
  • panOnShapes
  • parentBinding A string that indicates either the data item field name defining the "parent" relationship or a function name that returns the destination of a link for the specified data item. cast the value as a String
  • predecessorsBinding A string that indicates either the data item field name defining the predecessors or a function name that returns the origins of a link for the specified data item. cast the value as a String
  • select enable or disable selecting entities
  • selectionMode
  • showZoomFactor Display the current zoom factor
  • showZoomFeedback Display a visual feedback while zooming with animation
  • startNodeBinding A string that indicates either the data item field name defining the "start" of a link or a function name that returns the origin of a link for the specified data item. cast the value as a String and set the default as field with name of "start"
  • subgraphMenu optional dijit.Menu for subgraphs (property)
  • subgraphStyle A dictionary of property-value pairs that define global properties to apply on subgraphs. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
  • subgraphTemplate A description object that defines the graphical representation of subgraphs.
  • successorsBinding A string that indicates either the data item field name defining the successors or a function name that returns the destination of a link for the specified data item. cast the value as a String
  • templateString
  • textDir A string that indicates the text direction of displayed text
  • viewportAirFactor The minimum navigable space to the sides of the current content bounds as a percentage with respect to the current model bounding box.
  • viewportAnimated Boolean flag to indicate that viewport movements are animated by default.
  • viewportClass
  • viewportMaxZoom Defines how much the view rectangle can zoom in. Unlimited if 0.
  • viewportMinZoom Defines how much the view rectangle can zoom out. If 0, the limit is based on the contentRectangle.
  • viewportResizeMode Resize mode of the vieport. See Viewport.js
  • wheelPan enable or disable scrolling with the mouse wheel (vertical panning)
  • xBinding A string that indicates either the data item field name defining the "x location" associated with a nodesStore data item or a named function that returns the "x location" associated with a nodesStore data item. cast the value as a String
  • yBinding A string that indicates either the data item field name defining the "y location" associated with a nodesStore data item or a named function that returns the "y location" associated with a nodesStore data item. cast the value as a String
  • zoom enable or disable zooming

Method Summary

  • addAnnotation(ge, kwArgs) The entity being annotated
  • afterGraphElementDispose(graphElement) this method is called after any graph element is disposed
  • allowCreateLink(startNode, endNode) evaluates if the link between two nodes can be created, based on the allowCreateLinkFunction
  • allowCreateNode(parent, child) evaluates if the nodes can be created, based on the allowCreateLinkFunction
  • asGraphElement(itemOrGraphElement)
  • assignInteractorInputs(iid, assignments)
  • beforeGraphElementDispose(graphElement) this method is called before any graph element is disposed
  • buildRendering()
  • centerOnNode(nodeOrLink, options) Centers the viewport on an object of the graph. Does not change the zoom level.
  • changeAdornersFocus(focus, newFocus, possibleCursors, mustchangeAdornersFocus)
  • connectNodes(start, end, template, linkItem) Connects the specified nodes. This method creates a ibm_ilog.diagram.Link instance invoking the createLink() method and connects its extremities to the specified nodes. Optionally, one may specify the linksStore item associated with this link.
  • constructor()
  • createAdorner(clazz, templates, rootId)
  • createLink(start, end, template, linkItem, linkType) Creates a Link to connect the specified nodes. Optionally, one may specify the linksStore item associated with this link.
  • createLinkFunction() An optional function that creates the ibm_ilog.diagram.Link instance for a given data item. The function receives the following parameters: linkItem : the link data item, if any. startNode: the link start node. endNode: the link end node. templateObj : the template object. graph : the parent graph of the link. diagram : a reference to this diagram widget.
  • createNode(template, item, onGraph, nodeType) Creates a Node that represents the specified data item.
  • createNodeFunction() An optional function that creates the ibm_ilog.diagram.Node instance for a given data item. The function receives the following parameters: item : the data item associated with this node. templateObj : A template object. graph : the target graph to create the node from. diagram : a reference to this diagram widget.
  • createSubgraph(template, item, onGraph, nodeType) Creates a Subgraph that represents the specified data item.
  • createSubgraphFunction() An optional function that creates the ibm_ilog.diagram.Subgraph instance for a given data item. The function receives the following parameters: item : associated with this node. templateObj : the template object. graph : the target graph to create the subgraph from. diagram : a reference to this diagram widget.
  • createTemplatedShape(shapeType, template, onGraph, style, store, item) Creates an instance of the specified type fully initialized.
  • deleteGraphElements(elements) returns Boolean Deletes the selected elements and all the connected links.
  • destroy()
  • destroyAdorner(a)
  • doDeleteFunction() An optional function that handles delete operation and returns a corresponding Action to be added to the undo manager (see ibm_ilog.diagram.editor.undo.Action). If no function is specified, the default behavior is to remove and dispose the graphical shapes from the diagram without any datastore-related considerations. The function receives the following parameters: diagram: ibm_ilog.diagram.widget.Diagram. The diagram containing the elements to remove. elements: ibm_ilog.diagram.GraphElement. The graphical elements to delete. The function must returns a ibm_ilog.diagram.editor.undo.Action instance that matches the function implementation (aka: capable of undoing the deletion).
  • enableDropable(enabled)
  • enableLowCpuMode(enable)
  • enableMarqueePartialSelection(b)
  • enterStandardMode() TODO TBD. Probably to be renamed also
  • fitToContents(margin, zoomOutOnly)
  • getAllowFreeLinks() This method is deprecated from 1.1. Use dojo.get('allowFreeLinks') instead. true, if the diagram allow free links (links with no end or start node)
  • getAnnotationList(ge)
  • getAssociatedLinkAdornersFunction(ge)
  • getAssociatedNodeAdornersFunction(ge)
  • getAssociatedSubgraphAdornersFunction()
  • getBoundItem(nodeOrLink) Returns the data item, if any, associated with the specified node or link.
  • getClipboard() return the private instance of ibm_ilog.diagram.editor.Clipboard
  • getDropInteractor() return the drop interactor
  • getEditables(ge) Return the editable attachpoints of a graph element
  • getFocusAdorner(ge)
  • getFocusedElement()
  • getGraph() Returns the ibm_ilog.diagram.Graph instance that displays the graph.
  • getGraphElementFromDataItem(item) Gets the GFX object, for the given Data Item.
  • getGraphToClientTransform() returns dojox.gfx.matrix.Matrix2D Returns the matrix used to transform coordinates of objects contained in this diagram's graph (returned by <code>getGraph()</code>) to coordinates relative to the client browser's page.
  • getGraphToDiagramTransform() returns dojox.gfx.matrix.Matrix2D Returns the matrix used to transform coordinates of objects contained in this diagram's graph (returned by <code>getGraph()</code>) to coordinates relative to this Diagram object.
  • getGraphTransform() Returns the graph transform.
  • getInlineEditorId(id) returns the inline editor registered with the given id
  • getInteractor(id)
  • getInteractorManager()
  • getLinkAdornersFocus() Returns the current link adorners focus.
  • getNodeAdornersFocus() Returns the current node adorners focus.
  • getNodeRect(node, inClient) returns Object Returns the bounding rectangle of a node of the graph, in client (i.e., browser page) coordinates, or relative to the Diagram.
  • getParent() Returns the parent widget of this widget, assuming the parent specifies isContainer
  • getSelection() Return the selection object
  • getSurface() Returns the dojox.gfx.Surface object displaying the graph.
  • getUndoManager() return the private instance of ibm_ilog.diagram.editor.undo.UndoManager
  • getViewport() Gets the Viewport instance.
  • hideTooltip() Hides the dijit master tooltip, if currently in use by the Diagram.
  • initializeEditables(ge) scan the attachpoints of graph element ge in search for editable fields initialize the corresponding infrastructure to allow editing.
  • isLowCpuMode()
  • isMovableFunction() This function is an optional callback to configure how the MoveInteractor tests movability of elements function(graphElement) { // summary: // Return true if the given graph element is allowed to move // graphElement: // The graph element to test. }
  • linkTemplateFunction() an optional function that computes the link template dynamically based on the item. The function receives the following parameters: linkItem : the link data item, if any. startNode: the link start node. endNode: the link end node. diagram : a reference to this diagram widget.
  • load() loads the data stores and creates the diagram.
  • lowCpuModeChanged()
  • moveFunction() This function is an optional callback to configure how the MoveInteractor applies the movement deltas on entities. function(graphElement,originalTransform,delta) { // summary: // Concrete the movement to a graph element. // graphElement: // The graph element to move. // originalTransform: // The matrix representing the location from which the delta is computed. // delta: // The ammount to translate the entity from its original location. },
  • mustFreeAdornersFocus(graphElement, point, margin, outOfBounds)
  • nodeTemplateFunction() an optional function that computes the node template based on the item. The function receives the following parameters: item : the data item to create node from diagram : a reference to this diagram widget.
  • openEditableInlineEditor(editable) Open the inline editor associated with a graph element editable attachpoint.
  • performGraphLayout() Executes the graph layout and/or the link layout specified by the setNodeLayout() and setLinkLayout methods.
  • postCreate()
  • postMixInProperties()
  • postPostCreate() Hook executed just after Diagram postCreate. Used by DiagramEditor subclass.
  • registerInlineEditor(id, editor) Registers a new inline editor with a certain id.
  • removeAnnotation(annotation)
  • reset()
  • resize(info)
  • resolveLinkTemplate(linkItem, start, end) Returns the link template to represent the specified relationship.
  • resolveNodeTemplate(item) Returns the template to represent the specified node item.
  • resolveSubgraphTemplate(item) Returns the template to represent the specified subgraph item.
  • setAcceptedDropTypes(types) Sets the accepted types to be dropped.
  • setAllowFreeLinks(allowFreeLinks) This method is deprecated from 1.1. Use dojo.set('allowFreeLinks', value) instead. Sets if the diagram allow free links (links with no end or start node)
  • setFocusedElement(ge)
  • setLinkAdornersFocus(ge) Sets the link adorners focus on a graph element. Used by the adorners focus interactor;
  • setMarqueeMode(b)
  • setNodeAdornersFocus(ge) Sets the node adorners focus on a graph element. Used by the adorners focus interactor;
  • showTooltip(ge, innerHTML, dontHideOnChange) Opens the dijit master tooltip on a graph element.
  • startup()
  • subgraphTemplateFunction() an optional function that computes the subgraph template based on the item. The function receives the following parameters: item : the data item to create subgraph from. diagram : a reference to this diagram widget.
  • toSvg(onComplete, onError, all) Export the graph as an SVG string.
  • useDataStore()
  • visualizeBounds(graphic, options) Makes the bounds of a graph object visible, givin it an extra air between the area and the borders of the viewport if possible. The view may be zoomed out if required, but it is never zoomed in.

Event Summary

Attached Objects

Properties

adorners
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable adorners focus following mouse pointer
allowCreateLinkFunction
This function is called to know if it is allowed to create a new link between two nodes return true by default. format: allowCreateLinkFunction(DiagramEditor, startNode, endNode)
allowCreateNodeFunction
This function is called to know if it is allowed to create a new node return true by default. format: allowCreateNodeFunction(DiagramEditor, parentNode, childNode)
allowFreeLinks
this value determine if the interactors can create free links
annotationsEnabled
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
to disable annotations.
automaticLinkLayout
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
automaticNodeLayout
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
backMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
optional dijit.Menu for the diagram background (property)
centerOnLocation
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
If true, the values provided by xBinding/yBinding atributes represent the center of the node. If false, the values provided by xBinding/yBinding atributes represent the top left-hand corner of the node.
childBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "child" relationship or a function name that returns the origin of a link for the specified data item. cast the value as a String
containerNode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
createAnnotationAdornerFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
to specify what adorner to create for annotating the given GraphElement
createLinksForHierarchy
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
If true, the hierarchy is rendered using nodes and links. If false, it is rendered using subgraphs and nodes
destroyAnnotationAdornerFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
to the createAnnotationAdornerFunction, this functions destroyed the previously created annotation.
disableGraphWai
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
disableInlineEditors
domNode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
dropable
endNodeBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "end" of a link or a function name that returns the destination of a link for the specified data item. cast the value as a String and set the default as field with name of "end"
focus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
getAssociatedLinkAdornersFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
function which must return the adorners associated with the adorner focus on the given link.
getAssociatedNodeAdornersFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
function which must return the adorners associated with the adorner focus on the given node.
getAssociatedSubgraphAdornersFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
function which must return the adorners associated with the adorner focus on the given subgraph.
getTooltipAroundPlacementFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
function used to compute the graph element bounding box used to compute the tooltip placement.
getTooltipContentFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
function used to build the tooltip content associated with the given graph element.
hasAnnotationFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
to specify when the adorner needs an annotation adorner created
hud
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Use to disable the entire viewport hud.
lastMenuEvent
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
lastMenuTarget
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
entity on which the last/current menu was opened.
linkLayout
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
linkLayoutActive
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
linkMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
optional dijit.Menu for links (property)
linkStyle
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dictionary of property-value pairs that define global properties to apply on links. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
linkTemplate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A description object that defines the graphical representation of links.
linksGraphBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "link graphic data" associated with a linksStore data item or a named function that returns the "link graphic data" associated with a linksStore data item. cast the value as a String
linksGraphProperties
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A comma-separated list of properties to save if linksGraphBinding is specified.
linksQuery
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An object providing the query criteria for the links datas store. cast the value as a String
linksQueryOptions
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An object containing additional options for the links query. cast the value as an Object
linksStore
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A data store that provides data item to be represented as Links when the nodes relationship cannot be implicitly deducted from the nodes store data structure. Must implement at least the dojo.data.api.Read and dojo.data.api.Identity interfaces.
loadAnnotationsFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
to create the annotations already associated with data already present in the ge.
marquee
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable marquee selection
move
enable or disable moving entities (true by default at DiagramEditor)
nodeLayout
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
nodeLayoutActive
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
nodeMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
optional dijit.Menu for nodes (property)
nodeStyle
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dictionary of property-value pairs that define global properties to apply on nodes. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
nodeTemplate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A description object that defines the graphical representation of nodes.
nodesGraphBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "node graphic data" associated with a nodeStore data item or a named function that returns the "node graphic data" associated with a linksStore data item. cast the value as a String
nodesGraphProperties
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A comma-separated list of properties to save if nodesGraphBinding is specified.
nodesQuery
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
nodesQueryOptions
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An object containing additional options for the node query. cast the value as an Object
nodesStore
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A data store that provides data item to be represented as Nodes. Must implement at least the dojo.data.api.Read and dojo.data.api.Identity interfaces.
onDropFunction
This function is called on diagram drop action format: DropFunction(droppedItem,point,Diagram,overElements,undoAction)
onDropTemplateFunction
this function is called to determine the template on drop action format: DropTemplateFunction(droppedItem,dataItem,diagram)
onLinkClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkDblClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseDown
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseEnter
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseLeave
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseOut
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseOver
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onLinkMouseUp
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeDblClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseDown
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseEnter
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseLeave
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseOut
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseOver
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onNodeMouseUp
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphDblClick
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseDown
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseEnter
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseLeave
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseOut
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseOver
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
onSubgraphMouseUp
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
overview
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Use the embedded overview hud component
overviewPan
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Activate or deactivate panning in the hud overview
overviewRenderer
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Use renderer used in the embedded overview
overviewSize
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
The size of the embedded Overview
overviewZoom
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Activate or deactivate panning in the hud overview
pan
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable panning if clicking on shapes.
panOnShapes
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
parentBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "parent" relationship or a function name that returns the destination of a link for the specified data item. cast the value as a String
predecessorsBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the predecessors or a function name that returns the origins of a link for the specified data item. cast the value as a String
select
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable selecting entities
selectionMode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
showZoomFactor
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Display the current zoom factor
showZoomFeedback
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Display a visual feedback while zooming with animation
startNodeBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "start" of a link or a function name that returns the origin of a link for the specified data item. cast the value as a String and set the default as field with name of "start"
subgraphMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
optional dijit.Menu for subgraphs (property)
subgraphStyle
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dictionary of property-value pairs that define global properties to apply on subgraphs. Properties must obey the Java get/set naming convention in order to be taken into account (i.e. for a property 'myProperty', there must be a getMyProperty and a setMyProperty methods defined on the node).
subgraphTemplate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A description object that defines the graphical representation of subgraphs.
successorsBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the successors or a function name that returns the destination of a link for the specified data item. cast the value as a String
templateString
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
textDir
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates the text direction of displayed text
viewportAirFactor
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
The minimum navigable space to the sides of the current content bounds as a percentage with respect to the current model bounding box.
viewportAnimated
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Boolean flag to indicate that viewport movements are animated by default.
viewportClass
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
viewportMaxZoom
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Defines how much the view rectangle can zoom in. Unlimited if 0.
viewportMinZoom
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Defines how much the view rectangle can zoom out. If 0, the limit is based on the contentRectangle.
viewportResizeMode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Resize mode of the vieport. See Viewport.js
wheelPan
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable scrolling with the mouse wheel (vertical panning)
xBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "x location" associated with a nodesStore data item or a named function that returns the "x location" associated with a nodesStore data item. cast the value as a String
yBinding
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A string that indicates either the data item field name defining the "y location" associated with a nodesStore data item or a named function that returns the "y location" associated with a nodesStore data item. cast the value as a String
zoom
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
enable or disable zooming

Methods

addAnnotation
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
The entity being annotated
ParameterTypeDescription
geibm_ilog.diagram.GraphElementThe entity being annotated
kwArgs
afterGraphElementDispose
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
this method is called after any graph element is disposed
ParameterTypeDescription
graphElement
allowCreateLink
evaluates if the link between two nodes can be created, based on the allowCreateLinkFunction
ParameterTypeDescription
startNodeibm_ilog.diagram.Nodethe possible link start node enNode: ibm_ilog.diagram.Node the possible link end node
endNode
allowCreateNode
evaluates if the nodes can be created, based on the allowCreateLinkFunction
ParameterTypeDescription
parentibm_ilog.diagram.Nodethe possible parent of the node
childibm_ilog.diagram.Nodethe created node
asGraphElement
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
itemOrGraphElement
assignInteractorInputs
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
iid
assignments
beforeGraphElementDispose
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
this method is called before any graph element is disposed
ParameterTypeDescription
graphElement
buildRendering
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
centerOnNode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Centers the viewport on an object of the graph. Does not change the zoom level.
ParameterTypeDescription
nodeOrLinkNode|Link
options{animate}
changeAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
focus
newFocus
possibleCursors
mustchangeAdornersFocus
connectNodes
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ibm_ilog.diagram.Link
Connects the specified nodes. This method creates a ibm_ilog.diagram.Link instance invoking the createLink() method and connects its extremities to the specified nodes. Optionally, one may specify the linksStore item associated with this link.
ParameterTypeDescription
startibm_ilog.diagram.Node: the link start node.
endibm_ilog.diagram.Nodeibm_ilog.diagram.Node: the link end node.
templateString||ObjectObject or String : the template to use. Optional.
linkItemdojo.data.Itemdojo.data.Item: the data item corresponding to this link, if any. Optional.
constructor
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
createAdorner
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
clazz
templates
rootId
createLink
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
a ibm_ilog.diagram.Link instance.

This method only creates the Link instance and does not connect the nodes. Caller may invoke the Diagram.connectNodes() method instead, which invokes this method and perfom the connection.

ParameterTypeDescription
startibm_ilog.diagram.Nodethe link start node.
endibm_ilog.diagram.Nodethe link end node.
templateObjector String the template to use. Optional.
linkItemdojo.data.Itemthe data item corresponding to this link, if any. Optional. nodeType: Function The type of the node instance. Optional.
linkTypeFunction
Optional.
createLinkFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An optional function that creates the ibm_ilog.diagram.Link instance for a given data item. The function receives the following parameters: linkItem : the link data item, if any. startNode: the link start node. endNode: the link end node. templateObj : the template object. graph : the parent graph of the link. diagram : a reference to this diagram widget.
createNode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A ibm_ilog.diagram.Node instance.
Creates a Node that represents the specified data item.
ParameterTypeDescription
templateObjector String The template to use for this node. Optional.
itemdojo.data.api.Itema data item associated with this node. Optional.
onGraphibm_ilog.diagram.GraphThe parent graph of the node. If null, the top-level graph is used. Optional.
nodeTypeFunction
Optional.
The type of the node instance. Optional.
createNodeFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An optional function that creates the ibm_ilog.diagram.Node instance for a given data item. The function receives the following parameters: item : the data item associated with this node. templateObj : A template object. graph : the target graph to create the node from. diagram : a reference to this diagram widget.
createSubgraph
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A ibm_ilog.diagram.Subgraph instance.
Creates a Subgraph that represents the specified data item.
ParameterTypeDescription
templateObjector String The template to use for this subgraph. Optional.
itemdojo.data.api.Itema data item associated with this subgraph. Optional.
onGraphibm_ilog.diagram.GraphThe parent graph of the subgraph. If null, the top-level graph is used. Optional.
nodeTypeFunction
Optional.
The type of the node instance. Optional.
createSubgraphFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An optional function that creates the ibm_ilog.diagram.Subgraph instance for a given data item. The function receives the following parameters: item : associated with this node. templateObj : the template object. graph : the target graph to create the subgraph from. diagram : a reference to this diagram widget.
createTemplatedShape
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram

This method creates an instance of the specified type and populates it with the specified template. If the template defines bindings to the shape or the data item (if any), bindings are resolved.

ParameterTypeDescription
shapeTypeFunctionThe type of the instance.
templateString||Object
Optional.
a template defining the shape contents. If no template is specified, the default Subgraph template will be used. Optional.
onGraphibm_ilog.diagram.Graph
Optional.
the parent graph. Optional. store : dojo.data.api.Read a data store. Optional.
styleObject
Optional.
storedojo.data.api.Read
Optional.
itemObject
Optional.
dojo.data.api.Item: a data item associated with this shape. Optional.
deleteGraphElements
Returns Boolean: true if the deletion could be performed, false otherwise.

This method should be invoked to delete the specified elements from the diagram and handles the interface with the undo manager. The way the delete operation itself is performed may be customized by setting the doDeleteFunction property to a custom implementation. The default implementation removes and disposes the graphical shapes from the diagram without any datastore-related considerations. If you need to change this behavior, set this property so that it gets invoked instead of the default implementation.

ParameterTypeDescription
elementsibm_ilog.diagram.GraphElement[]The elements to delete.
destroy
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
destroyAdorner
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
a
doDeleteFunction
An optional function that handles delete operation and returns a corresponding Action to be added to the undo manager (see ibm_ilog.diagram.editor.undo.Action). If no function is specified, the default behavior is to remove and dispose the graphical shapes from the diagram without any datastore-related considerations. The function receives the following parameters: diagram: ibm_ilog.diagram.widget.Diagram. The diagram containing the elements to remove. elements: ibm_ilog.diagram.GraphElement. The graphical elements to delete. The function must returns a ibm_ilog.diagram.editor.undo.Action instance that matches the function implementation (aka: capable of undoing the deletion).
enableDropable
ParameterTypeDescription
enabled
enableLowCpuMode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
enable
enableMarqueePartialSelection
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
bboolean
enterStandardMode
Overrides ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
TODO TBD. Probably to be renamed also
fitToContents
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
margin
zoomOutOnly
getAllowFreeLinks
This method is deprecated from 1.1. Use dojo.get('allowFreeLinks') instead. true, if the diagram allow free links (links with no end or start node)
getAnnotationList
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dojox.collections.ArrayList with the annotations created for the graph element. note: Creates an empty list if none is registered yet.
ParameterTypeDescription
ge
getAssociatedLinkAdornersFunction
ParameterTypeDescription
ge
getAssociatedNodeAdornersFunction
ParameterTypeDescription
ge
getAssociatedSubgraphAdornersFunction
getBoundItem
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the data item, if any, associated with the specified node or link.
ParameterTypeDescription
nodeOrLinkibm_ilog.diagram.Node|| ibm_ilog.diagram.Link || ibm_ilog.diagram.Subgraph: the node, link or subgraph instance.
getClipboard
return the private instance of ibm_ilog.diagram.editor.Clipboard
getDropInteractor
return the drop interactor
getEditables
The set of the editable attachpoint belonging to a graph element.
Return the editable attachpoints of a graph element
ParameterTypeDescription
geibm_diargram.GraphElement
getFocusAdorner
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
getFocusedElement
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
getGraph
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An ibm_ilog.diagram.Graph instance.
Returns the ibm_ilog.diagram.Graph instance that displays the graph.
getGraphElementFromDataItem
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Gets the GFX object, for the given Data Item.
ParameterTypeDescription
item
getGraphToClientTransform
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns dojox.gfx.matrix.Matrix2D: A dojox.gfx.matrix.Matrix2D instance.
Returns the matrix used to transform coordinates of objects contained in this diagram's graph (returned by <code>getGraph()</code>) to coordinates relative to the client browser's page.
getGraphToDiagramTransform
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns dojox.gfx.matrix.Matrix2D: A dojox.gfx.matrix.Matrix2D instance.
Returns the matrix used to transform coordinates of objects contained in this diagram's graph (returned by <code>getGraph()</code>) to coordinates relative to this Diagram object.
getGraphTransform
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dojox.gfx.matrix.Matrix2D instance that represents the current graph transform.
Returns the graph transform.
getInlineEditorId
returns the inline editor registered with the given id
ParameterTypeDescription
id
getInteractor
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
id
getInteractorManager
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
getLinkAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the current link adorners focus.
getNodeAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the current node adorners focus.
getNodeRect
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns Object: An object with x, y, width and height properties.

This method computes the bounding rectangle of a node contained in this Diagram widget. The returned rectangle is either relative to the whole browser page (if inClient is true or omitted), or relative to the bounds of the Diagram widget (if inClient is false).

ParameterTypeDescription
nodeibm_ilog.diagram.NodeA Node of the Graph displayed in this Diagram.
inClientBooleanIf true (the default), the returned rectangle is relative to the whole browser page. If false, the returned rectangle is relative to the bounds of the Diagram widget.
getParent
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the parent widget of this widget, assuming the parent specifies isContainer
getSelection
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Return the selection object
getSurface
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
A dojox.gfx.Surface instance.
Returns the dojox.gfx.Surface object displaying the graph.
getUndoManager
return the private instance of ibm_ilog.diagram.editor.undo.UndoManager
getViewport
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Gets the Viewport instance.
hideTooltip
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Hides the dijit master tooltip, if currently in use by the Diagram.
initializeEditables
scan the attachpoints of graph element ge in search for editable fields initialize the corresponding infrastructure to allow editing.
ParameterTypeDescription
gethegraph element
isLowCpuMode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
isMovableFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
This function is an optional callback to configure how the MoveInteractor tests movability of elements function(graphElement) { // summary: // Return true if the given graph element is allowed to move // graphElement: // The graph element to test. }
linkTemplateFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
an optional function that computes the link template dynamically based on the item. The function receives the following parameters: linkItem : the link data item, if any. startNode: the link start node. endNode: the link end node. diagram : a reference to this diagram widget.
load
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
loads the data stores and creates the diagram.
lowCpuModeChanged
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
moveFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
This function is an optional callback to configure how the MoveInteractor applies the movement deltas on entities. function(graphElement,originalTransform,delta) { // summary: // Concrete the movement to a graph element. // graphElement: // The graph element to move. // originalTransform: // The matrix representing the location from which the delta is computed. // delta: // The ammount to translate the entity from its original location. },
mustFreeAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
graphElement
point
margin
outOfBounds
nodeTemplateFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
an optional function that computes the node template based on the item. The function receives the following parameters: item : the data item to create node from diagram : a reference to this diagram widget.
openEditableInlineEditor
Open the inline editor associated with a graph element editable attachpoint.
ParameterTypeDescription
editablege:,attach:,base:}The editable attachpoint belonging to a graph element.
performGraphLayout
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram

If a non-null graph layout has been specified by calling setNodeLayout(), and if the graph layout is active (that is, unless setNodeLayoutActive(false) has been called), then the graph layout algorithm is performed on the contents of this graph. Then, if a non-null link layout has been specified by calling setLinkLayout(), and if the link layout is active (that is, unless setLinkLayoutActive(false) has been called), then the link layout algorithm is performed on the contents of this graph.

postCreate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
postMixInProperties
Overrides ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
postPostCreate
Overrides ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Hook executed just after Diagram postCreate. Used by DiagramEditor subclass.
registerInlineEditor
Registers a new inline editor with a certain id.
ParameterTypeDescription
idstringThe associated id for referencing the editor from editable attachpoints at graph element templates.
editoribm_ilog.diagram.editor.adorners.TextEditAdornerThe adorner used as editor.
removeAnnotation
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
annotation
reset
Overrides ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
resize
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
info
resolveLinkTemplate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the link template to represent the specified relationship.
ParameterTypeDescription
linkItemdojo.data.Itemdojo.data.Item: the data item corresponding to this link, if any.
startibm_ilog.diagram.Node: the link start node.
endibm_ilog.diagram.Nodeibm_ilog.diagram.Node: the link end node.
resolveNodeTemplate
Overrides ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the template to represent the specified node item.
ParameterTypeDescription
itemdojo.data.Item:the node data item.
resolveSubgraphTemplate
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Returns the template to represent the specified subgraph item.
ParameterTypeDescription
item
setAcceptedDropTypes
Sets the accepted types to be dropped.
ParameterTypeDescription
types
setAllowFreeLinks
This method is deprecated from 1.1. Use dojo.set('allowFreeLinks', value) instead. Sets if the diagram allow free links (links with no end or start node)
ParameterTypeDescription
allowFreeLinksbooleantrue, if the diagram allow free links (links with no end or start node)
setFocusedElement
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
setLinkAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Sets the link adorners focus on a graph element. Used by the adorners focus interactor;
ParameterTypeDescription
ge
setMarqueeMode
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
bint
setNodeAdornersFocus
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Sets the node adorners focus on a graph element. Used by the adorners focus interactor;
ParameterTypeDescription
ge
showTooltip
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram

Opens a tooltip for a graph element. The content is get using the getTooltipContentFunction function. Optionally, the content can be overriden using the 'innerHTML' argument.

ParameterTypeDescription
geibm_ilog.diagram.GraphElementthe graph element
innerHTMLString
Optional.
optional argument that overrides the content of the tooltip.
dontHideOnChangebooleanoption to disable auto-hiding of the tooltip then the element reports changes
startup
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
subgraphTemplateFunction
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
an optional function that computes the subgraph template based on the item. The function receives the following parameters: item : the data item to create subgraph from. diagram : a reference to this diagram widget.
toSvg
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram

Export the graph as an SVG string. This features requires Dojo 1.4.x or greater.

ParameterTypeDescription
onCompleteFunctionThe callback that receives the resulting SVG.
onErrorFunctionThe function called when the generation fails.
allBooleanIndicates whether the whole graph should be visible in the resulting svg. If false, only the visible area is displayed. The default value is false.
useDataStore
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
visualizeBounds
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Makes the bounds of a graph object visible, givin it an extra air between the area and the borders of the viewport if possible. The view may be zoomed out if required, but it is never zoomed in.
ParameterTypeDescription
graphicNode|Link|SubgraphThe object to make visible
options{expandCurrent:false,airFactor}Viewport options kwArgs

Events

onFocusedElementChanged
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
oldValue
newValue
onLinkAdornersFocusChanged
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
event that occurs when the link adorners focus has changed.
ParameterTypeDescription
oldValue
newValue
onLinkContextMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
l
e
onLinkCreated
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Invoked when the specified link has been created.
ParameterTypeDescription
linkibm_ilog.diagram.Linkibm_ilog.diagram.Link: the new link instance.
startibm_ilog.diagram.Nodeibm_ilog.diagram.Node: the link start node, if any.
endibm_ilog.diagram.Nodeibm_ilog.diagram.Node: the link end node, if any.
diagramibm_ilog.diagram.widget.Diagramibm_ilog.diagram.widget.Diagram: the diagram instance that fired the event.
onLinkTouchEnd
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onLinkTouchMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onLinkTouchStart
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onLinkUpdated
this is the DiagramEditor instance.
ParameterTypeDescription
diagramibm_ilog.diagram.editor.DiagramEditorthis is the DiagramEditor instance.
linkibm_ilog.diagram.Linkthe updated link.
isNewbooleanidentify if the link is recently created (true) or just modified (false).
undoActionibm_ilog.diagram.editor.undo.Actionthe Action that take place in this edition
onLoaded
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Invoked when the diagram has loaded the data.
onNodeAdornersFocusChanged
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
event that occurs when the adorners focus has changed.
ParameterTypeDescription
oldValue
newValue
onNodeContextMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
n
e
onNodeCreated
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Invoked when the specified node has been created.
ParameterTypeDescription
nodeibm_ilog.diagram.Node:the new node instance.
diagramibm_ilog.diagram.widget.Diagram:the diagram instance that fired the event.
onNodeTouchEnd
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onNodeTouchMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onNodeTouchStart
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onPropertyChanged
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
An extension point invoked when a property has changed.
ParameterTypeDescription
nameStringString: the property name.
oldValueObjectObject: the old property value.
newValueObjectObject: the new property value.
onSubgraphContextMenu
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
s
e
onSubgraphCreated
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
Invoked when the specified subgraph object has been created and initialized. The default implementation does nothing.
ParameterTypeDescription
subgraphibm_ilog.diagram.Subgraphibm_ilog.diagram.Subgraph: the new subgraph instance.
diagramibm_ilog.diagram.widget.Diagramibm_ilog.diagram.widget.Diagram: the diagram instance that fired the event.
onSubgraphTouchEnd
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onSubgraphTouchMove
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event
onSubgraphTouchStart
Defined by ibm_ilog.diagram.widget._Diagram, ibm_ilog.diagram.widget.Diagram
ParameterTypeDescription
ge
event