org.graphstream.ui.layout
Class LayoutRunner

java.lang.Object
  extended by java.lang.Thread
      extended by org.graphstream.ui.layout.LayoutRunner
All Implemented Interfaces:
Runnable

public class LayoutRunner
extends Thread

Allows to run a layout in a distinct thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LayoutRunner(Graph graph, Layout layout, boolean start, boolean replay)
           
LayoutRunner(Source source, Layout layout)
          New layout runner that listen at the given source and compute a layout on its graph structure in a distinct thread.
LayoutRunner(Source source, Layout layout, boolean start)
          New layout runner that listen at the given source and compute a layout on its graph structure in a distinct thread.
 
Method Summary
 ProxyPipe newLayoutPipe()
          Pipe out whose input is connected to the layout algorithm.
 void release()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LayoutRunner

public LayoutRunner(Source source,
                    Layout layout)
New layout runner that listen at the given source and compute a layout on its graph structure in a distinct thread.

Parameters:
source - The source of graph events.
layout - The layout algorithm to use.

LayoutRunner

public LayoutRunner(Source source,
                    Layout layout,
                    boolean start)
New layout runner that listen at the given source and compute a layout on its graph structure in a distinct thread.

Parameters:
source - The source of graph events.
layout - The layout algorithm to use.
start - Start the layout thread immediately ? Else the start() method must be called later.

LayoutRunner

public LayoutRunner(Graph graph,
                    Layout layout,
                    boolean start,
                    boolean replay)
Method Detail

newLayoutPipe

public ProxyPipe newLayoutPipe()
Pipe out whose input is connected to the layout algorithm. You can safely connect as a sink to it to receive events of the layout from a distinct thread.


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

release

public void release()


Copyright © 2011. All Rights Reserved.