The base class ibm_ilog.graphlayout.GraphLayoutReport stores the following information:
Code
This field contains information about special, predefined
cases that have occurred during the layout. The possible values are:
ibm_ilog.graphlayout.GraphLayoutReport.LAYOUT_DONE
appears if the layout was performed successfully.ibm_ilog.graphlayout.GraphLayoutReport.STOPPED_AND_VALID
appears if the layout was performed but was stopped before completion, either because the layout time elapsed or because the methodstopImmediately
was called. The positions of nodes and links are valid at the stopping point because the layout algorithm uses an iterative mechanism.ibm_ilog.graphlayout.GraphLayoutReport.STOPPED_AND_INVALID
appears if a (noniterative) layout was performed but was stopped before completion, either because the layout time elapsed or because the methodstopImmediately
was called. The positions of nodes and links are not valid at the stopping point. Often, they have not yet been changed at all.ibm_ilog.graphlayout.GraphLayoutReport.NOT_NEEDED
appears if the layout was not performed because no changes occurred in the graph and parameters since the last time the layout was performed successfully.ibm_ilog.graphlayout.GraphLayoutReport.EMPTY_GRAPHER
appears if the graph is empty.
To read the code, use the method getCode:
var report = graphLayout.getLayoutReport(); var reportCode = report.getCode();
Layout time
This field contains the total duration of the layout
algorithm at the end of the layout. To read the time (in milliseconds):
var time = report.getLayoutTime();
Percentage of completion
This field contains an estimation of the percentage of
the layout that has been completed. It can be used if the layout algorithm
supports the generic percentage completion calculation feature, see Percentage of completion calculation. It is typically
used inside layout event listeners that are described in the following
section.
To access the percentage, use the method getPercentageComplete:
var percentage = report.getPercentageComplete();
Additional information
Additional information for particular layout algorithms
is stored by the subclasses of
ibm_ilog.graphlayout.GraphLayoutReport
.
For details, see the reference documentation of these classes: