public class WindowManager extends Object
Creating a window manager is as simple as creating an instance of
WindowManager
. Associating a window with a window manager is
done with WindowManager.add(Window)
. A window is automatically
removed from its window manager as a side effect of closing the window.
Window
Constructor and Description |
---|
WindowManager()
Creates an empty window manager without a parent window
manager (that is, a root window manager).
|
WindowManager(WindowManager parent)
Creates an empty window manager with the given
window manager as parent.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Window window)
Adds the given window to the set of windows managed by
this window manager.
|
boolean |
close()
Attempts to close all windows managed by this window manager,
as well as windows managed by any descendent window managers.
|
int |
getWindowCount()
Returns this window manager's number of windows
|
Window[] |
getWindows()
Returns this window manager's set of windows.
|
void |
remove(Window window)
Removes the given window from the set of windows managed by
this window manager.
|
public WindowManager()
public WindowManager(WindowManager parent)
parent
- the parent window managerpublic void add(Window window)
window
- the windowpublic boolean close()
true
if all windows were sucessfully closed,
and false
if any window refused to closepublic int getWindowCount()
public Window[] getWindows()
public final void remove(Window window)
window
- the window
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.