org.springframework.richclient.samples.petclinic
Class PetClinicLifecycleAdvisor

java.lang.Object
  extended by org.springframework.richclient.application.config.ApplicationLifecycleAdvisor
      extended by org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor
          extended by org.springframework.richclient.samples.petclinic.PetClinicLifecycleAdvisor
All Implemented Interfaces:
EventListener, InitializingBean, ApplicationListener

public class PetClinicLifecycleAdvisor
extends DefaultApplicationLifecycleAdvisor

Custom application lifecycle implementation that configures the petclinic app at well defined points within its lifecycle.

Author:
Keith Donald

Constructor Summary
PetClinicLifecycleAdvisor()
           
 
Method Summary
 void onCommandsCreated(ApplicationWindow window)
          When commands are created, lookup the login command and execute it.
 void onPreStartup()
          Show a setup wizard before actual applicationWindow is created.
 void onPreWindowOpen(ApplicationWindowConfigurer configurer)
          Additional window configuration before it is created.
 
Methods inherited from class org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor
addChildCommandContext, createWindowCommandManager, getChildCommandContexts, getCommandBarFactory, getCommandGroup, getMenuBarCommandGroup, getToolBarCommandGroup, initNewWindowCommandBarFactory, onApplicationEvent, setMenubarBeanName, setToolbarBeanName, setWindowCommandBarDefinitions, setWindowCommandManagerBeanName
 
Methods inherited from class org.springframework.richclient.application.config.ApplicationLifecycleAdvisor
afterPropertiesSet, getApplication, getApplicationServices, getOpeningWindow, getRegisterableExceptionHandler, getStartingPageId, getStatusBar, onPostStartup, onPreInitialize, onPreWindowClose, onShutdown, onWindowCreated, onWindowOpened, setApplication, setOpeningWindow, setRegisterableExceptionHandler, setStartingPageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PetClinicLifecycleAdvisor

public PetClinicLifecycleAdvisor()
Method Detail

onPreStartup

public void onPreStartup()
Show a setup wizard before actual applicationWindow is created. This should happen only on Application startup and only once. (note: for this to happen only once, a state should be preserved, which is not the case with this sample)

Overrides:
onPreStartup in class ApplicationLifecycleAdvisor

onPreWindowOpen

public void onPreWindowOpen(ApplicationWindowConfigurer configurer)
Additional window configuration before it is created.

Overrides:
onPreWindowOpen in class ApplicationLifecycleAdvisor

onCommandsCreated

public void onCommandsCreated(ApplicationWindow window)
When commands are created, lookup the login command and execute it.

Overrides:
onCommandsCreated in class ApplicationLifecycleAdvisor
Parameters:
window - applicationWindow.


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.