com.retek.commons.gui.util
Class WindowController

java.lang.Object
  extended bycom.retek.commons.gui.util.WindowController

public class WindowController
extends java.lang.Object

This class is used to track all the open windows. It is used to hide and show entire sets of windows at the same time. It can also be used to stop closing a program with work windows open. It can also be used to keep from opening the same sub-window twice.

This class is designed to allow the same window to be allowed twice as long as the identifier is different (thus the usage of a HashMap).

Retek Inc. Copyright (c) 2002


Method Summary
static void addWindow(java.lang.String windowId, java.awt.Window window)
          Adds a window to the controller.
static boolean hasOpenWindows()
          Retrieves where or not sub-windows are currently open within the application.
static void hide()
          Hides all currently existing windows.
static void removeWindow(java.lang.String windowId)
          Removes a window from the controller.
static void show()
          Shows all currently existing windows.
static boolean showWindow(java.lang.String windowId)
          Displays a single window on the screen that was previous hidden.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addWindow

public static void addWindow(java.lang.String windowId,
                             java.awt.Window window)
Adds a window to the controller.

Parameters:
windowId - The window id to register as the window key.
window - The window to register.

removeWindow

public static void removeWindow(java.lang.String windowId)
Removes a window from the controller.

Parameters:
windowId - The window id of the window to remove.

showWindow

public static boolean showWindow(java.lang.String windowId)
Displays a single window on the screen that was previous hidden.

Parameters:
windowId - The window id of the window to display.
Returns:
True if the window successfully displayed, false if it did not.

hide

public static void hide()
Hides all currently existing windows.


show

public static void show()
Shows all currently existing windows. Note that the "show" makes a callback to register. Hopefully, this works since the object already has a synchronization lock.


hasOpenWindows

public static boolean hasOpenWindows()
Retrieves where or not sub-windows are currently open within the application.

Returns:
True if window controller has sub-windows open, false if it does not.


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28