public final class LabelLayoutEvent extends EventObject
LabelLayoutEventListener on a layout instance,
a LabelLayoutEvent is delivered to the listeners each
time the method IlvLabelLayout.layoutStepPerformed() is called
by the layout algorithms. This allows you to obtain the layout report
(using the method getLayoutReport()) more than once during
the layout and to be informed of the behavior of the layout algorithm
before its completion. You can, for example, implement a progress bar
and update it each time you receive the layout event.
Note that the layout event is delivered only if the method IlvLabelLayout.layoutStepPerformed() is called. This depends on the
implementation of the method IlvLabelLayout.layout(boolean).
source| Constructor and Description |
|---|
LabelLayoutEvent(IlvLabelLayout layout)
Creates the event.
|
| Modifier and Type | Method and Description |
|---|---|
IlvLabelLayoutReport |
getLayoutReport()
Returns the label layout report contained in the event.
|
boolean |
isLayoutFinished()
Returns
true if this event is sent at the end of the
label layout process of a manager, and false otherwise. |
boolean |
isLayoutStarted()
Returns
true if this event is the first event at the
beginning of the label layout process of a manager, and
false otherwise. |
getSource, toStringpublic LabelLayoutEvent(IlvLabelLayout layout)
layout - The layout instance source of the eventpublic boolean isLayoutStarted()
true if this event is the first event at the
beginning of the label layout process of a manager, and
false otherwise.
If this method returns true, the method isLayoutFinished() called on the same event instance returns
false.
You can use this method to detect the first event sent by the layout
process , for instance, in order to print a message or give feedback
to the end user. Note that the method returns false for
the events that follow the first event.
isLayoutFinished()public boolean isLayoutFinished()
true if this event is sent at the end of the
label layout process of a manager, and false otherwise.
You can use this method to detect the last event sent by the layout
process of a manager, and to get from it the corresponding layout
report code using IlvLabelLayoutReport.getCode(). You can use
for instance the following code:
if (event.isLayoutFinished())
System.out.println("final code: " + event.getLayoutReport().getCode());
isLayoutStarted()public IlvLabelLayoutReport getLayoutReport()
getLayoutReport on the layout instance that is the
source of the event.
Note that if a subclass of IlvLabelLayout overrides the
method createLayoutReport(), the method can return an
instance of a subclass of IlvLabelLayoutReport,
depending on the class of layout report created.
IlvLabelLayout.createLayoutReport()© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.