The
performLayout
methods start the layout algorithm using the currently attached
manager and the current settings for the layout parameters. The
method returns a report object that contains information about
the behavior of the label layout algorithm.
IlvLabelLayoutReport performLayout() IlvLabelLayoutReport performLayout(boolean force, boolean redraw)
The first method simply calls the second one with the
force
argument set to
false
and the
redraw
argument set to
true
.
- Because the
force
argument is set tofalse
(by default), the layout algorithm first verifies whether it is necessary to perform the layout. It checks internal flags to see whether the manager or any of the parameters have changed since the last time the layout was successfully performed. A “change” can be any of the following ones:- Obstacles or labels were added or removed.
- Obstacles or labels were moved or reshaped.
- The value of a layout parameter was modified.
- The transformer changed while nonzoomable obstacles or labels were used.
Users often do not want the layout to be computed again if no changes occurred. If there were no changes, the methodperformLayout
returns without performing the layout. If the argumentforce
is passed astrue
, the verification is skipped, and layout is performed even if no changes occurred. - The
redraw
argument determines whether the manager needs to be redrawn. This mechanism works exactly in the same way as in graph layout. For details, see Redrawing the grapher after layout.The protected abstract methodlayout(boolean redraw)
is then called. This means that control is passed to the subclasses that are implementing this method. The implementation computes the layout and moves the labels to new positions.