|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgriffon.javafx.WindowManager
public final class WindowManager extends Object
Controls a set of windows that belong to the application.
Windows that are controlled by a WindowManager can be shown/hidden using a custom strategy (WindowDisplayHandler)
| Nested Class Summary | |
|---|---|
private class |
WindowManager.OnWindowHiddenHelper
Listener that triggers application events when a window is hidden. |
private class |
WindowManager.OnWindowHidingHelper
WindowAdapter that invokes hide() when the window is about to be closed. |
private class |
WindowManager.OnWindowShownHelper
Listener that triggers application events when a window is shown. |
| Field Summary | |
|---|---|
private static org.slf4j.Logger |
LOG
|
private JavaFXGriffonApplication |
app
|
private WindowManager.OnWindowHiddenHelper |
onWindowHidden
|
private WindowManager.OnWindowHidingHelper |
onWindowHiding
|
private WindowManager.OnWindowShownHelper |
onWindowShown
|
private Map |
windows
|
| Constructor Summary | |
WindowManager(JavaFXGriffonApplication app)
Creates a new WindowManager tied to an specific application. |
|
| Method Summary | |
|---|---|
void
|
attach(String name, javafx.stage.Window window)
Registers a window on this manager if an only if the window is not null and it's not registered already. |
boolean
|
canShutdown(GriffonApplication app)
|
void
|
detach(javafx.stage.Window window)
Removes the window from the list of manages windows if and only if it is registered with this manager. |
javafx.stage.Window
|
findWindow(String name)
Finds a Window by name. |
String
|
findWindowName(javafx.stage.Window window)
|
javafx.stage.Window
|
getStartingWindow()
Finds the Window that should be displayed during the Ready phase of an application. |
Collection
|
getWindows()
Returns the list of windows managed by this manager. |
void
|
handleClose(javafx.stage.Window widget)
|
void
|
hide(javafx.stage.Window window)
Hides the window. |
void
|
onShutdown(GriffonApplication app)
Hides all visible windows |
void
|
show(javafx.stage.Window window)
Shows the window. |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private static final org.slf4j.Logger LOG
private final JavaFXGriffonApplication app
private final WindowManager.OnWindowHiddenHelper onWindowHidden
private final WindowManager.OnWindowHidingHelper onWindowHiding
private final WindowManager.OnWindowShownHelper onWindowShown
private final Map windows
| Constructor Detail |
|---|
public WindowManager(JavaFXGriffonApplication app)
app - an application
| Method Detail |
|---|
public void attach(String name, javafx.stage.Window window)
window - the window to be added to the list of managed windows
public boolean canShutdown(GriffonApplication app)
public void detach(javafx.stage.Window window)
window - the window to be removed
public javafx.stage.Window findWindow(String name)
name - the value of the name: property
public String findWindowName(javafx.stage.Window window)
public javafx.stage.Window getStartingWindow()
javafx.windowManager.startingWindow to be present in order to
determine which Window will be displayed during the Ready phase. If no configuration is found the WindowManmager will pick the
first Window found in the list of managed windows.
The configuration flag accepts two value types:
public Collection getWindows()
public void handleClose(javafx.stage.Window widget)
public void hide(javafx.stage.Window window)
window - the window to hide
public void onShutdown(GriffonApplication app)
public void show(javafx.stage.Window window)
window - the window to show
Groovy Documentation