proper.gui.core.frame
Class FrameThread

java.lang.Object
  extended by java.lang.Thread
      extended by proper.gui.core.frame.FrameThread
All Implemented Interfaces:
java.lang.Runnable

public class FrameThread
extends java.lang.Thread

Represents the Thread-Class with a few enhancements for frames.

Version:
$Revision: 1.3 $
Author:
FracPete

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FrameThread(ProperFrame parent)
          initializes the thread
 
Method Summary
 void afterRun()
          code that should be execute in the run()-method at the end
 void beforeRun()
          code that should be execute in the run()-method at the beginning
 ProperFrame getParentFrame()
          returns the parent frame which owns this thread
 boolean isRunning()
          whether the thread is still running
 void stopRunning()
          stops the thread, i.e.
 
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, run, 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

FrameThread

public FrameThread(ProperFrame parent)
initializes the thread

Method Detail

getParentFrame

public ProperFrame getParentFrame()
returns the parent frame which owns this thread


isRunning

public boolean isRunning()
whether the thread is still running


stopRunning

public void stopRunning()
stops the thread, i.e. the current execution is carried out, but not the next one (e.g. in a for-loop). it represents a "clean" stop of the thread even though it might not stop immediately


beforeRun

public void beforeRun()
code that should be execute in the run()-method at the beginning


afterRun

public void afterRun()
code that should be execute in the run()-method at the end