cage
Class EmbedThread

java.lang.Object
  extended by java.lang.Thread
      extended by cage.EmbedThread
All Implemented Interfaces:
java.lang.Runnable

public class EmbedThread
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 boolean debug
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EmbedThread(Embedder embedder, int priorityOffset)
          Creates a new thread for running the given Embedder and that has its priority lowered by priorityOffset.
 
Method Summary
 void abort()
           
 void embed(CaGeResult result, java.beans.PropertyChangeListener listener, boolean do2D, boolean do3D, boolean redo2D)
          Schedules a new embedding to be calculated.
 void end()
           
 void fireTaskFinished()
           
 java.lang.String getDiagnosticOutput()
           
 EmbedThreadListener getEmbedThreadListener()
           
 void last()
           
 void run()
           
 void setDiagnosticOutput(java.lang.String diagnosticOutput)
           
 void setEmbedThreadListener(EmbedThreadListener embedThreadListener)
           
 int tasksCompleted()
           
 int tasksGiven()
           
 int tasksLeft()
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public volatile boolean debug
Constructor Detail

EmbedThread

public EmbedThread(Embedder embedder,
                   int priorityOffset)
Creates a new thread for running the given Embedder and that has its priority lowered by priorityOffset.

Parameters:
embedder - The Embedder to run in this thread.
priorityOffset - The amount by which this thread has its priority lowered.
Method Detail

run

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

setDiagnosticOutput

public void setDiagnosticOutput(java.lang.String diagnosticOutput)

getDiagnosticOutput

public java.lang.String getDiagnosticOutput()

embed

public void embed(CaGeResult result,
                  java.beans.PropertyChangeListener listener,
                  boolean do2D,
                  boolean do3D,
                  boolean redo2D)
Schedules a new embedding to be calculated. The task will be added to the queue and when the embedding has been calculated the PropertyChangeListener is notified of a change in the property coordinates and the value is the succes of the embedding.

Parameters:
result -
listener -
do2D -
do3D -
redo2D -

end

public void end()

last

public void last()

abort

public void abort()

tasksGiven

public int tasksGiven()

tasksCompleted

public int tasksCompleted()

tasksLeft

public int tasksLeft()

fireTaskFinished

public void fireTaskFinished()

setEmbedThreadListener

public void setEmbedThreadListener(EmbedThreadListener embedThreadListener)

getEmbedThreadListener

public EmbedThreadListener getEmbedThreadListener()