klaus
Class KlausWindowManager

java.lang.Object
  extended by klaus.KlausWindowManager

public class KlausWindowManager
extends Object

This class manages the windows. As the usercan open as many windows as he wants in a single instance of Klaus, these windows have to be managed.

Since:
2009-03-10
Author:
Stephan Hillebrand

Nested Class Summary
private  class KlausWindowManager.WindowManagerThread
          This thread is necessary for periodical updates of the window list.
 
Field Summary
private static KlausWindowManager manager
           
private static KlausWindowManager.WindowManagerThread updateThread
           
private  HashMap<String,KlausWindow> windows
          This HashMap stores all windows.
 
Constructor Summary
KlausWindowManager()
           
 
Method Summary
static KlausWindowManager getInstance()
           
 KlausWindow getWindowByHandle(String handle)
           
 void startWindowManager()
          Start update thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

windows

private HashMap<String,KlausWindow> windows
This HashMap stores all windows. Identification is done by a String handle.


manager

private static KlausWindowManager manager

updateThread

private static KlausWindowManager.WindowManagerThread updateThread
Constructor Detail

KlausWindowManager

public KlausWindowManager()
Method Detail

getInstance

public static KlausWindowManager getInstance()

startWindowManager

public void startWindowManager()
Start update thread. This has to be done AFTER the first window (main window) was opened. Else the program might terminate before the window was opened on rather slow machines.


getWindowByHandle

public KlausWindow getWindowByHandle(String handle)