The label layout report

The label layout report contains information about the particular behavior of a label layout algorithm. After the layout is completed, this information is available for reading from the label layout report. The information can also be obtained during layout by using a layout listener, as described in Layout events and listeners.
The layout report is created automatically at the start of layout via the method createLayoutReport and is available as long as the manager is attached to the layout instance.
To read a layout report, all you need to do is store the layout report instance returned by the performLayout method and read the information, as shown in the following example:
... 
IlvLabelLayoutReport layoutReport = labelLayout.performLayout(); 
if (layoutReport.getCode() == IlvLabelLayoutReport.LAYOUT_DONE)
     System.out.println("Label layout done."); 
else 
     System.out.println("Label layout not done, code = " +
                                         layoutReport.getCode());
The class IlvLabelLayoutReport stores the following information, which is very similar to the information stored in an IlvGraphLayoutReport (see Information stored in a layout report for details):

Code

This field contains information about special, predefined cases that may have occurred during the layout. The possible values are:
  • IlvLabelLayoutReport.LAYOUT_DONE
  • IlvLabelLayoutReport.STOPPED_AND_VALID
  • IlvLabelLayoutReport.STOPPED_AND_INVALID
  • IlvLabelLayoutReport.NOT_NEEDED
  • IlvLabelLayoutReport.NO_LABELS
  • IlvLabelLayoutReport.EXCEPTION_DURING_LAYOUT
To read the code, use the method:
int 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), use the method:
long getLayoutTime()  

Percentage of completion

This field contains an estimate of the percentage of the layout that has been completed. To access the percentage, use the method:
int getPercentageComplete()