|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.util.WindowProviderWrapper
public class WindowProviderWrapper
A wrapper around another WindowProvider, allows to exchange
providers without the need to reattach WindowProviderListeners.
| Constructor Summary | |
|---|---|
WindowProviderWrapper()
|
|
| Method Summary | |
|---|---|
void |
addWindowProviderListener(WindowProviderListener listener)
Adds a new listener to this provider. |
protected void |
fireVisibilityChanged(boolean showing)
Informs all listeners that the windows visibility has changed. |
protected void |
fireWindowChanged(Window window)
Informs all listeners that the window has changed. |
WindowProvider |
getDelegate()
Gets the provider which is be used by this to find a window. |
boolean |
isShowing()
Tells whether this window represents a window that is visible. |
protected WindowProviderListener[] |
listeners()
Gets all currently registered listeners. |
void |
removeWindowProviderListener(WindowProviderListener listener)
Removes a listener from this provider |
Window |
searchWindow()
Tries to find a window. |
void |
setDelegate(WindowProvider delegate)
Sets the provider which will be used to find a window. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WindowProviderWrapper()
| Method Detail |
|---|
public void addWindowProviderListener(WindowProviderListener listener)
WindowProvider
addWindowProviderListener in interface WindowProviderlistener - the new listenerpublic void removeWindowProviderListener(WindowProviderListener listener)
WindowProvider
removeWindowProviderListener in interface WindowProviderlistener - the listener to removeprotected WindowProviderListener[] listeners()
protected void fireWindowChanged(Window window)
window - the new window, might be nullprotected void fireVisibilityChanged(boolean showing)
showing - the new visibility statepublic void setDelegate(WindowProvider delegate)
delegate - the new provider, can be nullpublic WindowProvider getDelegate()
nullpublic Window searchWindow()
WindowProviderFrame
or a Dialog, and a plain Window only as last resort.
If possible the main-frame or another important window that will not
be closed soon should be returned. Visible windows are preferred over
non visible ones. This method is not guaranteed to have success,
null is a valid result. This method is not required
to return always the same window, however the WindowProviderListeners
should be informed when the result changes.
searchWindow in interface WindowProviderFrame which won't be closed in
the near future, any window which does not fulfill the requirements
or null if no window is available at all.public boolean isShowing()
WindowProviderWindow window = sarchWindow();
return window == null ? false : window.isShowing();
isShowing in interface WindowProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||