TrueZIP 6.8.3

de.schlichtherle.awt
Class Windows

java.lang.Object
  extended by de.schlichtherle.awt.Windows

public class Windows
extends Object

A utility class for window management. You cannot instantiate this class.

Since:
TrueZIP 6.4
Author:
Christian Schlichtherle

Field Summary
private static PropertyChangeListener focusListener
           
private static Reference lastFocusedWindow
           
private static Reference lastFocusManager
           
private static Reference parent
           
private static String PROPERTY_FOCUSED_WINDOW
           
 
Constructor Summary
Windows()
           
 
Method Summary
private static Window findFirstShowingWindow(Window w)
          Search the containment hierarchy updwards for the first showing window.
private static Window getAnyShowingWindow()
           
private static Window getAnyShowingWindow(Window[] windows)
           
static Window getLastFocusedWindow()
          Returns the last window which received the focus.
static Window getParentWindow()
          Returns a suitable parent window, which is the last explicitly set and still showing parent window or any of its showing parent windows, the last focused and still showing window or any of its showing parent windows or any other showing window - whichever is found first.
private static void observeFocusedWindow()
          Ensures that the focused window managed by the current keyboard focus manager is observed.
private static void setLastFocusedWindow(Window w)
           
private static void setLastFocusedWindow0(Window w)
           
static void setParentWindow(Window w)
          Deprecated. You shouldn't use this method any more, but rely on the implementation in getParentWindow().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_FOCUSED_WINDOW

private static final String PROPERTY_FOCUSED_WINDOW
See Also:
Constant Field Values

lastFocusManager

private static Reference lastFocusManager

lastFocusedWindow

private static Reference lastFocusedWindow

parent

private static Reference parent

focusListener

private static PropertyChangeListener focusListener
Constructor Detail

Windows

Windows()
Method Detail

getParentWindow

public static Window getParentWindow()
Returns a suitable parent window, which is the last explicitly set and still showing parent window or any of its showing parent windows, the last focused and still showing window or any of its showing parent windows or any other showing window - whichever is found first. If no showing window is found, JOptionPane's root frame is returned.


findFirstShowingWindow

private static Window findFirstShowingWindow(Window w)
Search the containment hierarchy updwards for the first showing window.


setParentWindow

public static void setParentWindow(Window w)
Deprecated. You shouldn't use this method any more, but rely on the implementation in getParentWindow().


getLastFocusedWindow

public static Window getLastFocusedWindow()
Returns the last window which received the focus. If no window received the focus yet or is already made eligible for finalization, null is returned instead. Note that this is not the same as Windows.getCurrentKeyboardFocusManager().getFocusedWindow(): The latter may return null if no window in this JVM has the focus, while this method will return the last window in this JVM which had the focus (unless this is also the first call to this method).


observeFocusedWindow

private static void observeFocusedWindow()
Ensures that the focused window managed by the current keyboard focus manager is observed.


setLastFocusedWindow

private static void setLastFocusedWindow(Window w)

setLastFocusedWindow0

private static void setLastFocusedWindow0(Window w)

getAnyShowingWindow

private static Window getAnyShowingWindow()

getAnyShowingWindow

private static Window getAnyShowingWindow(Window[] windows)

TrueZIP 6.8.3

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.