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

ibm_ilog.graphlayout.forcedirected.ForceDirectedLayoutReport

Object » ibm_ilog.graphlayout.GraphLayoutReport » ibm_ilog.graphlayout.forcedirected.ForceDirectedLayoutReport
dojo.require("ibm_ilog.graphlayout.forcedirected.ForceDirectedLayoutReport");

The class used to store information about the behavior of the ForceDirectedLayout.

Method Summary

  • codeToString(code) returns String Returns a message string (in English) corresponding to the code value that can be obtained by ' GraphLayoutReport.getCode()'.
  • constructor()
  • getCode() returns int Returns the code describing the current state of the layout algorithm.
  • getLayoutTime() returns Number Returns the total duration of the layout algorithm (in milliseconds).
  • getMaxMovePerIteration() returns Number Returns the maximum displacement of the nodes at the last performed iteration of the layout algorithm.
  • getNumberOfIterations() returns int Returns the number of performed iterations.
  • getPercentageComplete() returns int Returns the current percentage of completion during layout, if the layout algorithm supports the percentage completion feature.
  • setCode(code) Sets the code for the current state of the layout algorithm.

Methods

codeToString
Returns String: The message string (in English) corresponding to the specified code.

Returns a message string (in English) corresponding to the code value that can be obtained by GraphLayoutReport.getCode(). Subclasses of GraphLayoutReport can override and extend this method if they allow additional return values for GraphLayoutReport.getCode().

For example, the method returns the string "layout done" for the input code GraphLayoutReport.LAYOUT_DONE and the string "layout not needed" for the input code GraphLayoutReport.NOT_NEEDED.

ParameterTypeDescription
codeintThe code describing the current state of the layout algorithm.
getCode
Returns int

Returns the code describing the current state of the layout algorithm. The possible values are those defined in this class ( GraphLayoutReport.LAYOUT_DONE, GraphLayoutReport.STOPPED_AND_VALID, GraphLayoutReport.NOT_NEEDED, and so on) or those defined in subclasses of GraphLayoutReport.

The method can be called by GraphLayoutEventListener.layoutStepPerformed() to inform the listener about the status of layout. This method returns GraphLayoutReport.LAYOUT_STARTED if it is called at the beginning of the layout process (unless the layout is not needed).

It returns GraphLayoutReport.LAYOUT_FINISHED if it is called at the end of the layout process (unless the layout is not needed or the graph is empty).

Whenever the code GraphLayoutReport.LAYOUT_STARTED is returned, the code GraphLayoutReport.LAYOUT_FINISHED will also be returned, even in cases when an exception occurs during the layout process, the layout is stopped prematurely (by ibm_ilog.graphlayout.GraphLayout.stopImmediately(), or because the layout time elapsed).

getLayoutTime
Returns Number

Returns the total duration of the layout algorithm (in milliseconds). The starting and ending times are automatically recorded. The total duration is the sum of the duration of the methods ibm_ilog.graphlayout.GraphLayout.isLayoutNeeded() and ibm_ilog.graphlayout.GraphLayout.layout().

getMaxMovePerIteration
Returns Number

Returns the maximum displacement of the nodes at the last performed iteration of the layout algorithm.

getNumberOfIterations
Returns int

Returns the number of performed iterations.

getPercentageComplete
Returns int

Returns the current percentage of completion during layout, if the layout algorithm supports the percentage completion feature. This value is set to 0 at the beginning of layout, increases during layout, and reaches 100 at the end of layout.

setCode

Sets the code for the current state of the layout algorithm. Valid code values are those defined in this class (LAYOUT_DONE, STOPPED_AND_VALID, NOT_NEEDED, and so on) or those defined in subclasses of GraphLayoutReport. The codes are mutually exclusive. The last value specified using setCode(int) is returned by getCode().

Note that you should call this method only if you create your own layout class inside the implementation of ibm_ilog.graphlayout.GraphLayout.layout(). To obtain the layout report, use ibm_ilog.graphlayout.GraphLayout.getLayoutReport().

ParameterTypeDescription
codeintThe new code for the current state.