|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
ilog.views.graphlayout.labellayout.LabelLayoutEvent
public final class LabelLayoutEvent
If you install a 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).
LabelLayoutEventListener,
IlvLabelLayout.addLabelLayoutEventListener(ilog.views.graphlayout.labellayout.LabelLayoutEventListener),
IlvLabelLayout.layoutStepPerformed(),
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
LabelLayoutEvent(IlvLabelLayout layout)
Creates the event. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.util.EventObject |
|---|
getSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelLayoutEvent(IlvLabelLayout layout)
layout - The layout instance source of the event| Method Detail |
|---|
public 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 of a manager, 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()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||