|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--suvi.api.alg.BasicGraphLayoutAlgProgressPolicy
A default Null Object [PLOP3, Fowler1999] implementation that simply does nothing. This class is publicly available so that you can derive more specific progress policies and only override the methods that you need - you may not need or want to override all methods.
Note that it would not be generally safe to check for thread interrupts in a default implementation, because even though the graph layout algorithm is prepared for exceptions, the client of the layout algorithm may not be prepared.
Field Summary |
Fields inherited from interface suvi.api.alg.GraphLayoutAlgProgressPolicy |
NULL_PROGRESS_POLICY |
Constructor Summary | |
BasicGraphLayoutAlgProgressPolicy()
|
Method Summary | |
void |
layoutBegin()
Called once just after the layout -method is entered before any layoutProgress calls are made. |
void |
layoutCancelled(java.lang.Throwable cause)
Called once before layoutFinish if the
layout computation was cancelled due to an exception. |
void |
layoutFinish()
Called once just before the layout -method is about to return, either normally or as the result
of an exception, and after all the layoutProgress calls have been made. |
void |
layoutProgress(double percentage)
Called by the layout algorithm to report progress percentages, between 0.0 and 1.0 at appropriate
moments in the computation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicGraphLayoutAlgProgressPolicy()
Method Detail |
public void layoutBegin()
GraphLayoutAlgProgressPolicy
Called once just after the layout
-method is entered before any layoutProgress
calls are made.
layoutBegin
in interface GraphLayoutAlgProgressPolicy
public void layoutProgress(double percentage)
GraphLayoutAlgProgressPolicy
Called by the layout algorithm to report progress percentages,
between 0.0
and 1.0
at appropriate
moments in the computation.
The percentages will not be highly accurate, but should be useful for a simple progress display.
Called first just after the layout
-method is entered, with value 0.0
, and last just
before the layout
-method is about to return, with value 1.0
. Other
call points are not specified and may vary depending on
algorithm.
This method is always called from an environment that allows this method to throw any unchecked exception to effectively terminate the layout computation.
layoutProgress
in interface GraphLayoutAlgProgressPolicy
public void layoutCancelled(java.lang.Throwable cause)
GraphLayoutAlgProgressPolicy
Called once before layoutFinish
if the
layout computation was cancelled due to an exception.
layoutCancelled
in interface GraphLayoutAlgProgressPolicy
public void layoutFinish()
GraphLayoutAlgProgressPolicy
Called once just before the layout
-method is about to return, either normally or as the result
of an exception, and after all the layoutProgress
calls have been made.
layoutFinish
in interface GraphLayoutAlgProgressPolicy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |