danger.ui
Class WindowManager

java.lang.Object
  |
  +--danger.ui.WindowManager

public final class WindowManager
extends java.lang.Object

The WindowManager is completely opaque to applications. Apps will interact with it via the Window class and never directly. The WindowManager maintains a doubly-linked, circular list of Shadows, one for each running Application and each visible Window in the system. Applications obtain their Shadow at construction time and are introduced to the list at that moment. Windows obtain their Shadow at construction time, but are only added to the list when shown. When a Window is Hidden, its Shadow is removed from the list. The WindowManager keeps track of the current foreground app, and the invalid region for every visible Window. It is responsible for generating EVENT_WINDOW_PAINT events when a window should redraw to clean the invalid region. It is the only entity allowed to


Constructor Summary
WindowManager()
           
 
Method Summary
static void attach(Application a)
          Registers an app with the window manager
static void detach(Application a)
          Used during app unload to completely detach an app
static void dumpWindowInfo(boolean activeOnly)
           
static Window getFrontWindow(Application app)
           
static void installSystemApp(Application app)
          System Use Only.
static void installTitleWindow(Window w)
          System Use Only.
static boolean isApplicationActive(Application app)
           
static boolean isScreenWindowActive(ScreenWindow w)
           
static boolean isWindowActive(Window inWindow)
          Returns true if there are no other window in front of this one, including system windows.
static void noLongerUnresponsive(Application app)
          Called from Window as a result of catching the APPLICATION_NO_LONGER_UNRESPONSIVE event.
static void show(Application app)
          Brings the applications windows above other app windows (but not system windows) and sets it as the active app
static void titleBarNoLongerUnresponsive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowManager

public WindowManager()
Method Detail

attach

public static void attach(Application a)
Registers an app with the window manager

detach

public static void detach(Application a)
Used during app unload to completely detach an app

show

public static void show(Application app)
Brings the applications windows above other app windows (but not system windows) and sets it as the active app

isWindowActive

public static boolean isWindowActive(Window inWindow)
Returns true if there are no other window in front of this one, including system windows.

isScreenWindowActive

public static boolean isScreenWindowActive(ScreenWindow w)

isApplicationActive

public static boolean isApplicationActive(Application app)

installTitleWindow

public static void installTitleWindow(Window w)
System Use Only. No-Op after the system has started

installSystemApp

public static void installSystemApp(Application app)
System Use Only. No-Op after the system has started

getFrontWindow

public static Window getFrontWindow(Application app)

dumpWindowInfo

public static void dumpWindowInfo(boolean activeOnly)

noLongerUnresponsive

public static void noLongerUnresponsive(Application app)
Called from Window as a result of catching the APPLICATION_NO_LONGER_UNRESPONSIVE event.

titleBarNoLongerUnresponsive

public static void titleBarNoLongerUnresponsive()


Danger Confidential. Copyright © 2000-2003, Danger Inc.