bibliothek.gui.dock.util
Class DirectWindowProvider
java.lang.Object
bibliothek.gui.dock.util.AbstractWindowProvider
bibliothek.gui.dock.util.DirectWindowProvider
- All Implemented Interfaces:
- WindowProvider
public class DirectWindowProvider
- extends AbstractWindowProvider
A window provider where the window can be set directly.
- Author:
- Benjamin Sigg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectWindowProvider
public DirectWindowProvider()
- Creates a new window provider.
DirectWindowProvider
public DirectWindowProvider(Window window)
- Creates a new window provider.
- Parameters:
window
- the window which should be provided by this provider,
can be null
setWindow
public void setWindow(Window window)
- Sets the window which will be provided by this provider.
- Parameters:
window
- the new window, can be null
searchWindow
public Window searchWindow()
- Description copied from interface:
WindowProvider
- Tries to find a window. The result should either be a
Frame
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 WindowProviderListener
s
should be informed when the result changes.
- Returns:
- if possible a visible
Frame
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.