|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.springframework.richclient.application.WindowManager
public class WindowManager
A manager for a group of windows. Window managers are needed in applications which create many different windows in addition to a main window. A window manager can be used to remember all the windows that an application has created (independent of whether they are presently open or closed). There can be several window managers, and they can be arranged into a tree. This kind of organization makes it simple to close whole subgroupings of windows.
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
add(ApplicationWindow window)
Adds the given window to the set of windows managed by this window manager. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register a listener to all properties of this publisher. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Register a listener to a specific property. |
boolean |
close()
Attempts to close all windows managed by this window manager, as well as windows managed by any descendent window managers. |
ApplicationWindow |
getActiveWindow()
|
protected PropertyChangeSupport |
getChangeSupport()
|
WindowManager |
getParent()
|
ApplicationWindow[] |
getWindows()
Returns this window manager's set of windows. |
void |
remove(ApplicationWindow window)
Removes the given window from the set of windows managed by this window manager. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove the listener from all properties of this publisher. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove the listener from a specific property. |
void |
setActiveWindow(ApplicationWindow window)
Set the currently active window. |
int |
size()
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowManager()
public WindowManager(WindowManager parent)
parent
- the parent window managerMethod Detail |
---|
public void add(ApplicationWindow window)
window
- the windowpublic boolean close()
true
if all windows were sucessfully closed, and
false
if any window refused to closepublic ApplicationWindow[] getWindows()
public WindowManager getParent()
public final void remove(ApplicationWindow window)
window
- the windowpublic final void setActiveWindow(ApplicationWindow window)
window
- public final ApplicationWindow getActiveWindow()
public int size()
protected PropertyChangeSupport getChangeSupport()
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangePublisher
addPropertyChangeListener
in interface PropertyChangePublisher
listener
- the PropertyChangeListener
to register.public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangePublisher
addPropertyChangeListener
in interface PropertyChangePublisher
propertyName
- the property to monitor.listener
- the PropertyChangeListener
to register.public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangePublisher
removePropertyChangeListener
in interface PropertyChangePublisher
listener
- the PropertyChangeListener
to remove.public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangePublisher
removePropertyChangeListener
in interface PropertyChangePublisher
propertyName
- the property that was being monitored.listener
- the PropertyChangeListener
to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |