public final class NoopWindowManager extends Object implements WindowManager<Object>
| Constructor and Description |
|---|
NoopWindowManager(GriffonApplication application) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(String name,
Object 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)
Asks this handler if the application's shutdown sequence can proceed or not.
|
int |
countVisibleWindows()
Counts how many Windows are visible regardless of their attached status to this WindowManager.
|
void |
detach(String name)
Removes the window from the list of manages windows if and only if it
is registered with this manager.
|
Object |
findWindow(String name)
Finds a Window by name.
|
String |
findWindowName(Object window)
Lookups a name related to a Window.
|
Object |
getAt(int index)
Convenience method to get a managed Window by index.
|
Object |
getStartingWindow()
Finds the Window that should be displayed during the Ready phase of an application.
|
Set<String> |
getWindowNames()
Returns a set of names related to all windows managed by this manager.
|
Collection<Object> |
getWindows()
Returns the collection of windows managed by this manager.
|
void |
hide(Object window)
Hides the window.
|
void |
hide(String name)
Hides the window.
|
int |
indexOf(Object window)
Lookups the index related to a Window.
|
boolean |
isAutoShutdown()
Returns the value of the "application.autoShutdown" configuration flag.
|
void |
onShutdown(GriffonApplication app)
Hides all visible windows
|
void |
show(Object window)
Shows the window.
|
void |
show(String name)
Shows the window.
|
@Inject public NoopWindowManager(@Nonnull GriffonApplication application)
@Nullable public Object findWindow(@Nonnull String name)
WindowManagerfindWindow in interface WindowManager<Object>name - the value of the of the Window's name@Nullable public Object getAt(int index)
WindowManagerFollows the Groovy conventions for overriding the [] operator.
getAt in interface WindowManager<Object>index - the index of the Window to be retrieved@Nullable public Object getStartingWindow()
WindowManager
The WindowManager expects a configuration flag 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:
getStartingWindow in interface WindowManager<Object>@Nonnull public Collection<Object> getWindows()
WindowManagergetWindows in interface WindowManager<Object>@Nonnull public Set<String> getWindowNames()
WindowManagergetWindowNames in interface WindowManager<Object>@Nullable public String findWindowName(@Nonnull Object window)
WindowManagerfindWindowName in interface WindowManager<Object>window - the window to be looked uppublic int indexOf(@Nonnull Object window)
WindowManagerindexOf in interface WindowManager<Object>window - the window to be looked uppublic void attach(@Nonnull String name, @Nonnull Object window)
WindowManagerattach in interface WindowManager<Object>name - the value of the of the Window's namewindow - the window to be added to the list of managed windowspublic void detach(@Nonnull String name)
WindowManagerdetach in interface WindowManager<Object>name - the value of the of the Window's namepublic void show(@Nonnull Object window)
WindowManagerThis method is executed SYNCHRONOUSLY in the UI thread.
show in interface WindowManager<Object>window - the window to showpublic void show(@Nonnull String name)
WindowManagerThis method is executed SYNCHRONOUSLY in the UI thread.
show in interface WindowManager<Object>name - the name of window to showpublic void hide(@Nonnull Object window)
WindowManagerThis method is executed SYNCHRONOUSLY in the UI thread.
hide in interface WindowManager<Object>window - the window to hidepublic void hide(@Nonnull String name)
WindowManagerThis method is executed SYNCHRONOUSLY in the UI thread.
hide in interface WindowManager<Object>name - the name of window to hidepublic boolean canShutdown(@Nonnull GriffonApplication app)
ShutdownHandlerReturn false if the shutdown sequence must be aborted.
canShutdown in interface ShutdownHandlercanShutdown in interface WindowManager<Object>app - the current running applicationpublic void onShutdown(@Nonnull GriffonApplication app)
WindowManageronShutdown in interface ShutdownHandleronShutdown in interface WindowManager<Object>app - the current running applicationpublic int countVisibleWindows()
WindowManagercountVisibleWindows in interface WindowManager<Object>public boolean isAutoShutdown()
WindowManagerisAutoShutdown in interface WindowManager<Object>