klaus
Class KlausWindowManager.WindowManagerThread

java.lang.Object
  extended by java.lang.Thread
      extended by klaus.KlausWindowManager.WindowManagerThread
All Implemented Interfaces:
Runnable
Enclosing class:
KlausWindowManager

private class KlausWindowManager.WindowManagerThread
extends Thread

This thread is necessary for periodical updates of the window list. Up to now, it only checks which windows are closed. These windows are removed. If no windows are opened, the program will exit.

Since:
2009-03-11
Author:
Stephan Hillebrand

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  int emptyUpdates
          Counts the number of updates without any opened windows.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private KlausWindowManager.WindowManagerThread()
           
 
Method Summary
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

emptyUpdates

private int emptyUpdates
Counts the number of updates without any opened windows. If this ever reaches 5, the program will exit. Whenever a new window is found, this is set to 0 again. This will reduce the propability of a crash to almost 0.

Constructor Detail

KlausWindowManager.WindowManagerThread

private KlausWindowManager.WindowManagerThread()
Method Detail

run

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