|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgriffon.pivot.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.WindowStateHelper
WindowStateAdapter that triggers application events when a window is shown/hidden. |
| Field Summary | |
|---|---|
private static org.slf4j.Logger |
LOG
|
private PivotGriffonApplication |
app
|
private boolean |
hideBeforeHandler
|
private WindowManager.WindowStateHelper |
windowStateHelper
|
private List |
windows
|
| Constructor Summary | |
WindowManager(PivotGriffonApplication app)
Creates a new WindowManager tied to an specific application. |
|
| Method Summary | |
|---|---|
void
|
attach(org.apache.pivot.wtk.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(org.apache.pivot.wtk.Window window)
Removes the window from the list of manages windows if and only if it is registered with this manager. |
org.apache.pivot.wtk.Window
|
findWindow(String name)
Finds a Window by name. |
org.apache.pivot.wtk.Window
|
getAt(int index)
Convenience method to get a managed Window by index. |
org.apache.pivot.wtk.Window
|
getStartingWindow()
Finds the Window that should be displayed during the Ready phase of an application. |
List
|
getWindows()
Returns the list of windows managed by this manager. |
void
|
hide(org.apache.pivot.wtk.Window window)
Hides the window. |
void
|
hide(String name)
Hides the window. |
boolean
|
isHideBeforeHandler()
Should the window be hidden before all ShutdownHandlers be called ? |
void
|
onShutdown(GriffonApplication app)
Hides all visible windows |
void
|
setHideBeforeHandler(boolean hideBeforeHandler)
Set if the window should be hidden before all ShutdownHandler be called. |
void
|
show(org.apache.pivot.wtk.Window window)
Shows the window. |
void
|
show(String name)
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 PivotGriffonApplication app
private boolean hideBeforeHandler
private final WindowManager.WindowStateHelper windowStateHelper
private final List windows
| Constructor Detail |
|---|
public WindowManager(PivotGriffonApplication app)
app - an application
| Method Detail |
|---|
public void attach(org.apache.pivot.wtk.Window window)
window - the window to be added to the list of managed windows
public boolean canShutdown(GriffonApplication app)
public void detach(org.apache.pivot.wtk.Window window)
window - the window to be removed
public org.apache.pivot.wtk.Window findWindow(String name)
name - the value of the name: property
public org.apache.pivot.wtk.Window getAt(int index)
Follows the Groovy conventions for overriding the [] operator.
index - the index of the Window to be retrieved
public org.apache.pivot.wtk.Window getStartingWindow()
The WindowManager expects a configuration flag pivot.windowManager.startingWindow to be
present in order to determine which Window will be displayed during the Ready phase. If no configuration
is found the WindowManager will pick the first Window found in the list of managed windows.
The configuration flag accepts two value types:
public List getWindows()
public void hide(org.apache.pivot.wtk.Window window)
This method is executed SYNCHRONOUSLY in the UI thread.
window - the window to hide
public void hide(String name)
This method is executed SYNCHRONOUSLY in the UI thread.
name - the name of window to hide
public boolean isHideBeforeHandler()
public void onShutdown(GriffonApplication app)
public void setHideBeforeHandler(boolean hideBeforeHandler)
hideBeforeHandler - new value
public void show(org.apache.pivot.wtk.Window window)
This method is executed SYNCHRONOUSLY in the UI thread.
window - the window to show
public void show(String name)
This method is executed SYNCHRONOUSLY in the UI thread.
name - the name of window to show
Groovy Documentation