Search this API

y.view
Interface Graph2DLayoutExecutor.LayoutThreadHandle

Enclosing class:
Graph2DLayoutExecutor

public static interface Graph2DLayoutExecutor.LayoutThreadHandle

The interface of the handle that is returned by Graph2DLayoutExecutor.doLayout(Graph2DView, y.layout.Layouter, Runnable, y.view.Graph2DLayoutExecutor.ExceptionListener) that can be used to query the state and cancel an asynchronous layout calculation.

See Also:
Graph2DLayoutExecutor

Method Summary
 void cancel()
          Cancels the ongoing layout calculation.
 Throwable getException()
          Gets the exception (if any) that happened during the calculation of the layout.
 Thread getThread()
          Yields the thread that is used for the calculation of the layout or null if the thread has not yet been started.
 boolean isRunning()
          Determines whether the layout is still running.
 

Method Detail

getThread

Thread getThread()
Yields the thread that is used for the calculation of the layout or null if the thread has not yet been started.

Returns:
The thread or null

cancel

void cancel()
Cancels the ongoing layout calculation. This will try to abort the layout calculation and will prevent the result of the layout run from being applied to the graph. If the layout is already being animated, the animation will be cut short.

See Also:
isRunning()

isRunning

boolean isRunning()
Determines whether the layout is still running.


getException

Throwable getException()
Gets the exception (if any) that happened during the calculation of the layout.

Returns:
The exception or null if no exception has been recorded.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.