All of the following Lifecycle callbacks are actually called by DefaultApplicationWindow. So it appears if you wish you to implement your own ApplicationWindow and you wish to hook into these events you should call the methods at the appropriate points.
| Method Name |
Point of execution |
Default action provided by ApplicationLifecycleAdvisor |
| onCommandsCreated(ApplicationWindow window) |
after creation of an application's commands |
No op |
| onPreWindowOpen(ApplicationWindowConfigurer configurer) |
before a window is opened |
setting window title and image. |
| onPreWindowClose(ApplicationWindow window) |
before application window closes |
return true; |
| OnWindowCreated(ApplicationWindow window) |
Called by DefaultApplicationWindow's initWindow() method which is ultimately called by the Application's showPage(String) method. |
No op |
| showIntroComponentIfNecessary(ApplicationWindow window) |
Called by DefaultApplicationWindow's initWindow() method which is ultimately called by the Application's showPage(String) method. |
call (only once) protected void showIntro(ApplicationWindow window) - which is a no op. |
| onWindowOpened(ApplicationWindow window) |
Called by DefaultApplicationWindow's initWindow() after DefaultApplicationWindow's window is displayed. |
No op |
There are probably more.
The following methods can also be overridden - whether they were designed to be - other than by DefaultApplicationLifecycleAdvisor - I can't say. Each of these are called by DefaultApplicationWindow constructor.
| method name |
Default action provided by ApplicationLifecycleAdvisor |
Action provided by DefaultApplicationLifecycleAdvisor |
| createWindowCommandManager() |
create instance of ApplicationWindowCommandManager with no shared commands. |
uses the Magic Names in Spring Rich name windowCommandManager |
| getMenuBarCommandGroup() |
create instance of CommandGroup, which appears to not have any commands nor a group id. |
uses the Magic Names in Spring Rich name menuBar. |
| getToolBarCommandGroup() |
create instance of CommandGroup, which appears to not have any commands nor a group id. |
uses the Magic Names in Spring Rich name toolBar. |
| getStatusBarCommandGroup() |
create instance of StatusBarCommandGroup without a groupid |
Not overridden |