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

ibm_ilog.graphlayout.longlink.LongLinkLayoutReport (version 1.1-SNAPSHOT)

Object » ibm_ilog.graphlayout.GraphLayoutReport » ibm_ilog.graphlayout.longlink.LongLinkLayoutReport
dojo.require("ibm_ilog.graphlayout.longlink.LongLinkLayoutReport");

The class used to store information about the behavior of the Orthogonal Long Link Layout algorithm.

Property Summary

  • EMPTY_GRAPHER The layout was not performed because the graph is empty.
  • EXCEPTION_DURING_LAYOUT An exception has been raised during layout.
  • GREATEST_CODE The largest integer value used as an error code. You can use the value 'GREATEST_CODE+1' for the definition of a new code.
  • INITIAL_CODE The initial value of the code. The method ' GraphLayoutReport.getCode()' returns this value if no different code was ever set.
  • LAYOUT_DONE The layout was performed normally.
  • LAYOUT_FINISHED The layout was finished.
  • LAYOUT_STARTED The layout was started.
  • NOT_NEEDED The layout was not performed because there was no significant change in the graph since the last time the layout was performed successfully. This usually means that there was no change in the topology (no nodes or links were added or removed), no change in position (no nodes or links were moved), and no change in parameter values.
  • NO_MOVEABLE_NODE The layout was not performed because there are no movable nodes (all nodes are fixed). This may occur only if the subclass of ' GraphLayout' supports the preservation of fixed nodes (see ' ibm_ilog.graphlayout.GraphLayout.supportsPreserveFixedNodes()') and the method ' ibm_ilog.graphlayout.GraphLayout.setPreserveFixedNodes()' has been called with a 'true' argument.
  • NO_RESHAPEABLE_LINK The layout was not performed because there are no reshapeable links (all links are fixed). This may occur only if the subclass of ' GraphLayout' supports the preservation of fixed links (see ' ibm_ilog.graphlayout.GraphLayout.supportsPreserveFixedLinks()') and the method ' ibm_ilog.graphlayout.GraphLayout.setPreserveFixedLinks()' has been called with a 'true' argument.
  • STOPPED_AND_INVALID The layout was performed but stopped because either the layout time elapsed or ' ibm_ilog.graphlayout.GraphLayout.stopImmediately()' was called, and the result cannot be considered a valid layout. Noniterative layout algorithms set this result code if they do not run to completion (see ' ibm_ilog.graphlayout.GraphLayout.supportsStopImmediately()' and ' ibm_ilog.graphlayout.GraphLayout.supportsAllowedTime()'). The nodes and links are either at intermediate positions (that is, the positions seem to be placed randomly) or have not changed at all, depending on the specific behavior of the layout algorithm.
  • STOPPED_AND_VALID The layout was performed but stopped because either the layout time elapsed or ' ibm_ilog.graphlayout.GraphLayout.stopImmediately()' was called, and the result can be considered a valid layout. Iterative layout algorithms that can be stopped at any iteration set this result code if they do not run to completion (see ' ibm_ilog.graphlayout.GraphLayout.supportsStopImmediately()' and ' ibm_ilog.graphlayout.GraphLayout.supportsAllowedTime()').

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).
  • getNumberOfFallbackLinks() returns int Returns the number of links that could not be routed on the grid without obstacle overlaps.
  • 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.

Properties

EMPTY_GRAPHER
The layout was not performed because the graph is empty.
EXCEPTION_DURING_LAYOUT
An exception has been raised during layout.
GREATEST_CODE
The largest integer value used as an error code. You can use the value 'GREATEST_CODE+1' for the definition of a new code.
INITIAL_CODE
The initial value of the code. The method ' GraphLayoutReport.getCode()' returns this value if no different code was ever set.
LAYOUT_DONE
The layout was performed normally.
LAYOUT_FINISHED
The layout was finished.
LAYOUT_STARTED
The layout was started.
NOT_NEEDED
The layout was not performed because there was no significant change in the graph since the last time the layout was performed successfully. This usually means that there was no change in the topology (no nodes or links were added or removed), no change in position (no nodes or links were moved), and no change in parameter values.
NO_MOVEABLE_NODE
The layout was not performed because there are no movable nodes (all nodes are fixed). This may occur only if the subclass of ' GraphLayout' supports the preservation of fixed nodes (see ' ibm_ilog.graphlayout.GraphLayout.supportsPreserveFixedNodes()') and the method ' ibm_ilog.graphlayout.GraphLayout.setPreserveFixedNodes()' has been called with a 'true' argument.
NO_RESHAPEABLE_LINK
The layout was not performed because there are no reshapeable links (all links are fixed). This may occur only if the subclass of ' GraphLayout' supports the preservation of fixed links (see ' ibm_ilog.graphlayout.GraphLayout.supportsPreserveFixedLinks()') and the method ' ibm_ilog.graphlayout.GraphLayout.setPreserveFixedLinks()' has been called with a 'true' argument.
STOPPED_AND_INVALID
The layout was performed but stopped because either the layout time elapsed or ' ibm_ilog.graphlayout.GraphLayout.stopImmediately()' was called, and the result cannot be considered a valid layout. Noniterative layout algorithms set this result code if they do not run to completion (see ' ibm_ilog.graphlayout.GraphLayout.supportsStopImmediately()' and ' ibm_ilog.graphlayout.GraphLayout.supportsAllowedTime()'). The nodes and links are either at intermediate positions (that is, the positions seem to be placed randomly) or have not changed at all, depending on the specific behavior of the layout algorithm.
STOPPED_AND_VALID
The layout was performed but stopped because either the layout time elapsed or ' ibm_ilog.graphlayout.GraphLayout.stopImmediately()' was called, and the result can be considered a valid layout. Iterative layout algorithms that can be stopped at any iteration set this result code if they do not run to completion (see ' ibm_ilog.graphlayout.GraphLayout.supportsStopImmediately()' and ' ibm_ilog.graphlayout.GraphLayout.supportsAllowedTime()').

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().

getNumberOfFallbackLinks
Returns int: The number of links that could not be routed on the grid without obstacle overlaps.

Returns the number of links that could not be routed on the grid without obstacle overlaps.

A link may not be routed without overlaps if the allowed time to find a route for this link has elapsed (see LongLinkLayout.getAllowedTimePerLink()), or if the route would have to bypass too many obstacles (see LongLinkLayout.getMaxBacktrack()), or if there is no path on the grid from the start node to the end node that bypasses all obstacles.

If the fallback routing option was set to true by using LongLinkLayout.setFallbackRouteEnabled(), such links are routed by a simple fallback routing algorithm.

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.