public class FocusedWindowProvider extends AbstractWindowProvider
WindowProvider
monitoring a set of windows, the last window that had the focus
is the selected window.listeners
Constructor and Description |
---|
FocusedWindowProvider() |
Modifier and Type | Method and Description |
---|---|
void |
add(Window window) |
void |
remove(Window window) |
Window |
searchWindow()
Tries to find a window.
|
addWindowProviderListener, fireVisibilityChanged, fireWindowChanged, hasListeners, isShowing, listeners, removeWindowProviderListener, updateVisibility
public Window searchWindow()
WindowProvider
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.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.public void add(Window window)
public void remove(Window window)