org.springframework.richclient.application.config
Class DefaultApplicationLifecycleAdvisor

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.config.ApplicationLifecycleAdvisor
      extended by org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor
All Implemented Interfaces:
EventListener, InitializingBean, ApplicationListener
Direct Known Subclasses:
NavigatorApplicationLifecycleAdvisor, ShowcaseLifecycleAdvisor, SimpleLifecycleAdvisor

public class DefaultApplicationLifecycleAdvisor
extends ApplicationLifecycleAdvisor
implements ApplicationListener

Author:
Keith Donald

Constructor Summary
DefaultApplicationLifecycleAdvisor()
           
 
Method Summary
protected  void addChildCommandContext(ApplicationContext context)
          Add a new child command context.
 ApplicationWindowCommandManager createWindowCommandManager()
          Create a ApplicationWindowCommandManager for the application.
protected  List getChildCommandContexts()
          Get all the child command contexts that have been created.
protected  ConfigurableListableBeanFactory getCommandBarFactory()
           
protected  CommandGroup getCommandGroup(String name)
           
 CommandGroup getMenuBarCommandGroup()
          Create the menuBar for the application.
 CommandGroup getToolBarCommandGroup()
          Create the toolBar for the application.
protected  void initNewWindowCommandBarFactory()
           
 void onApplicationEvent(ApplicationEvent event)
          We need to deliver all application events down to the child command contexts that have been created.
 void setMenubarBeanName(String menubarBeanName)
           
 void setToolbarBeanName(String toolbarBeanName)
           
 void setWindowCommandBarDefinitions(String commandBarDefinitionLocation)
           
 void setWindowCommandManagerBeanName(String commandManagerBeanName)
           
 
Methods inherited from class org.springframework.richclient.application.config.ApplicationLifecycleAdvisor
afterPropertiesSet, getApplication, getApplicationServices, getApplicationSessionInitializer, getOpeningWindow, getRegisterableExceptionHandler, getStartingPageId, getStatusBar, onCommandsCreated, onPostStartup, onPreInitialize, onPreStartup, onPreWindowClose, onPreWindowOpen, onShutdown, onWindowCreated, onWindowOpened, setApplication, setApplicationSessionInitializer, setOpeningWindow, setRegisterableExceptionHandler, setStartingPageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultApplicationLifecycleAdvisor

public DefaultApplicationLifecycleAdvisor()
Method Detail

setWindowCommandBarDefinitions

public void setWindowCommandBarDefinitions(String commandBarDefinitionLocation)

setWindowCommandManagerBeanName

public void setWindowCommandManagerBeanName(String commandManagerBeanName)

setMenubarBeanName

public void setMenubarBeanName(String menubarBeanName)

setToolbarBeanName

public void setToolbarBeanName(String toolbarBeanName)

createWindowCommandManager

public ApplicationWindowCommandManager createWindowCommandManager()
Description copied from class: ApplicationLifecycleAdvisor
Create a ApplicationWindowCommandManager for the application.

Overrides:
createWindowCommandManager in class ApplicationLifecycleAdvisor
Returns:
applicationWindowCommandManager.

initNewWindowCommandBarFactory

protected void initNewWindowCommandBarFactory()

getCommandBarFactory

protected ConfigurableListableBeanFactory getCommandBarFactory()

getMenuBarCommandGroup

public CommandGroup getMenuBarCommandGroup()
Description copied from class: ApplicationLifecycleAdvisor
Create the menuBar for the application.

Overrides:
getMenuBarCommandGroup in class ApplicationLifecycleAdvisor
Returns:
a CommandGroup.

getToolBarCommandGroup

public CommandGroup getToolBarCommandGroup()
Description copied from class: ApplicationLifecycleAdvisor
Create the toolBar for the application.

Overrides:
getToolBarCommandGroup in class ApplicationLifecycleAdvisor
Returns:
a CommandGroup.

getCommandGroup

protected CommandGroup getCommandGroup(String name)

onApplicationEvent

public void onApplicationEvent(ApplicationEvent event)
We need to deliver all application events down to the child command contexts that have been created.

Specified by:
onApplicationEvent in interface ApplicationListener
Parameters:
event - to deliver

getChildCommandContexts

protected List getChildCommandContexts()
Get all the child command contexts that have been created.

Note, theactual collection is being returned - so be careful what you do to it.

Returns:
list of contexts

addChildCommandContext

protected void addChildCommandContext(ApplicationContext context)
Add a new child command context.

Parameters:
context -


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