|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
ilog.views.graphlayout.GraphLayoutEvent
public final class GraphLayoutEvent
Provides data for the layout step event on layout instances.
If you install a GraphLayoutEventListener on a layout
instance, a GraphLayoutEvent is delivered to the listeners
each time the method
IlvGraphLayout.layoutStepPerformed() is called by the
layout algorithms.
This allows you to obtain the layout report (using
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
IlvGraphLayout.layoutStepPerformed() is called. This depends
on the implementation of the method IlvGraphLayout.layout(boolean).
GraphLayoutEventListener,
IlvGraphLayout.addGraphLayoutEventListener(ilog.views.graphlayout.GraphLayoutEventListener),
IlvGraphLayout.layoutStepPerformed(),
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
GraphLayoutEvent(IlvGraphLayout layout)
Creates the event. |
|
| Method Summary | |
|---|---|
IlvGraphLayout |
getGraphLayout()
Returns the graph layout that is the source of the event. |
IlvGraphLayoutReport |
getLayoutReport()
Returns the graph layout report contained in the event. |
boolean |
isLayoutFinished()
Returns whether the layout just has finished. |
boolean |
isLayoutStarted()
Returns whether the layout just has started. |
| 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 GraphLayoutEvent(IlvGraphLayout 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 layout process of a graph, 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 graph, for instance, in order to print a message or to give
feedback to the end user. Note that the method returns
false for the events that follow the first event.
isLayoutFinished(),
IlvJGraphLayoutProgressBarpublic boolean isLayoutFinished()
true if this event is sent at the end of the
layout process of a graph, and false otherwise.
You can use this method to detect the last event sent by the layout
process of a graph, and to get the corresponding layout report
code from it using IlvGraphLayoutReport.getCode(). For example, you
could use the following code:
if (event.isLayoutFinished())
System.out.println("final code: " + event.getLayoutReport().getCode());
isLayoutStarted()public IlvGraphLayoutReport getLayoutReport()
IlvGraphLayout.getLayoutReport() on the
layout instance that is the source of the event.
Note that if a subclass of IlvGraphLayout overrides
the method IlvGraphLayout.createLayoutReport(), this
method can return an instance of a subclass of
IlvGraphLayoutReport,
depending on the class of layout report created.
IlvGraphLayout.createLayoutReport()public IlvGraphLayout getGraphLayout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||