com.jgraph.layout

Interface JGraphLayout.Stoppable

public static interface JGraphLayout.Stoppable

An additional interface that should be implemented if a layout is expected to run longer. Eg. if a layout for a few hundred cells is likely to take more than 1 second.
Method Summary
JGraphLayoutProgressgetProgress()
Returns the progress object that represents the progress of the current layout run.

Method Detail

getProgress

public JGraphLayoutProgress getProgress()
Returns the progress object that represents the progress of the current layout run. Once created, this instance should not be replaced during a layout run. For new runs you should use the reset method on the progress. Consequently, the max progress is only valid after the run method has been invoked, which means you should use a listener if you spawn a new thread.

By convention, the layout must check the isStopped method in its inner-most loops and return immediately if the method returns true.

Returns: Returns the progress for all layout runs.

Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.