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.graphlayout.ServerSideLayout (version 1.1-SNAPSHOT)

Object » ibm_ilog.diagram.graphlayout._AsynchronousLayout » ibm_ilog.diagram.graphlayout.ServerSideLayout
dojo.require("ibm_ilog.diagram.graphlayout.ServerSideLayout");

This class executes a layout algorithm on a server. operation: A ServerSideLayout object is constructed with the Graph object and the URL where the layout service is located. To execute a layout, the user must select the algorithm with the standard client-side GraphLayout API: graph.setNodeLayout(x); graph.setLinkLayout(y); After this, the ServerSideLayout object can be used to execute these algorithms on the server by calling: serverSideLayout.layout(); This will obtain the currently configured layouts on the graph object, including optional settings for laying out internal subgraphs, gather their configured parameters and requesting the equivalent layout on the server. Each time a layout is requested, the graph and the layout settings are serialized into a JSON object sent in the request. The layout() method returns a dojo.Deferred which is signaled after the execution is complete.

ibm_ilog.diagram.graphlayout._AsynchronousLayout

Method Summary

  • constructor(graph, url) Creates and configures a ServerSideLayout object.
  • getTimeout() returns int Returns the current timeout for the request sent to the server.
  • getUrl() returns String Returns the location of the layout service at the server.
  • isLocalParametersEnabled() returns Boolean Returns 'true' if the local (per node and per link) layout parameters are enabled.
  • isRunning() Returns true if the layout is currently running.
  • layout() returns dojo.Deferred Requests the layout and applies the results.
  • setLocalParametersEnabled(enabled) Sets whether the local (per node and per link) layout parameters are sent to the server-side layout service or to the web worker. enable: Boolean 'true' to enable the local parameters or 'false' to disable it.
  • setTimeout(msTimeout) Sets the timeout for the request sent to the server. The unit is milliseconds.
  • setUrl(url) Set the location of the layout service at the server.
  • stop() Stops the execution of the layout.

Methods

constructor
Overrides ibm_ilog.diagram.graphlayout._AsynchronousLayout
Creates and configures a ServerSideLayout object.
ParameterTypeDescription
graphGraphThe graph to be laid out.
urlstringString The URL where the server is located.
getTimeout
Returns int: The timeout (in milliseconds) for the request sent to the server.
Returns the current timeout for the request sent to the server.
getUrl
Returns String: The location of the layout service at the server.
Returns the location of the layout service at the server.
isLocalParametersEnabled
Defined by ibm_ilog.diagram.graphlayout._AsynchronousLayout
Returns Boolean: 'true' if the local (per node and per link) layout parameters are enabled.
Returns 'true' if the local (per node and per link) layout parameters are enabled.
isRunning
Defined by ibm_ilog.diagram.graphlayout._AsynchronousLayout
Returns true if the layout is currently running.
layout
Defined by ibm_ilog.diagram.graphlayout._AsynchronousLayout
Returns dojo.Deferred: a dojo.Deferred to signal when the process finishes.
Requests the layout and applies the results.
setLocalParametersEnabled
Defined by ibm_ilog.diagram.graphlayout._AsynchronousLayout
Sets whether the local (per node and per link) layout parameters are sent to the server-side layout service or to the web worker. enable: Boolean 'true' to enable the local parameters or 'false' to disable it.
ParameterTypeDescription
enabled
setTimeout
Sets the timeout for the request sent to the server. The unit is milliseconds.
ParameterTypeDescription
msTimeoutintThe timeout (in milliseconds) for the request sent to the server.
setUrl
Set the location of the layout service at the server.
ParameterTypeDescription
urlStringThe URL of the layout service at the server.
stop
Defined by ibm_ilog.diagram.graphlayout._AsynchronousLayout

If a graph layout is currently running, calling this method will stop the graph layout execution. No result is applied and the graph stays unchanged.