org.springframework.richclient.application
Class Application

java.lang.Object
  extended by org.springframework.richclient.application.Application
All Implemented Interfaces:
InitializingBean, ApplicationContextAware

public class Application
extends Object
implements InitializingBean, ApplicationContextAware

A singleton workbench or shell of a rich client application.

The application provides a point of reference and context for an entire application. It provides an interface to open application windows.

Author:
Keith Donald

Constructor Summary
Application()
           
Application(ApplicationDescriptor descriptor, ApplicationLifecycleAdvisor advisor)
           
Application(ApplicationLifecycleAdvisor advisor)
           
 
Method Summary
 void afterPropertiesSet()
           
 void close()
           
 void close(boolean force, int exitCode)
           
protected  ApplicationWindow createNewWindow()
           
 ApplicationWindow getActiveWindow()
          ActiveWindow is tracked by windowManager.
 ApplicationContext getApplicationContext()
           
 ApplicationDescriptor getDescriptor()
           
 Image getImage()
           
 ApplicationLifecycleAdvisor getLifecycleAdvisor()
           
 String getName()
           
 WindowManager getWindowManager()
           
static Application instance()
          Return the single application instance.
static boolean isLoaded()
           
static void load(Application instance)
          Load the single application instance.
 void openWindow(String pageDescriptorId)
           
static ApplicationServices services()
          Return a global service locator for application services.
 void setApplicationContext(ApplicationContext context)
           
 void setDescriptor(ApplicationDescriptor descriptor)
           
 void start()
          Starts this application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Application

public Application()

Application

public Application(ApplicationLifecycleAdvisor advisor)

Application

public Application(ApplicationDescriptor descriptor,
                   ApplicationLifecycleAdvisor advisor)
Method Detail

load

public static void load(Application instance)
Load the single application instance.

Parameters:
instance - The application

instance

public static Application instance()
Return the single application instance.

Returns:
The application

isLoaded

public static boolean isLoaded()

services

public static ApplicationServices services()
Return a global service locator for application services.

Returns:
The application services locator.

setDescriptor

public void setDescriptor(ApplicationDescriptor descriptor)

getDescriptor

public ApplicationDescriptor getDescriptor()

setApplicationContext

public void setApplicationContext(ApplicationContext context)
Specified by:
setApplicationContext in interface ApplicationContextAware

getApplicationContext

public ApplicationContext getApplicationContext()

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

getLifecycleAdvisor

public ApplicationLifecycleAdvisor getLifecycleAdvisor()

getName

public String getName()

getImage

public Image getImage()

openWindow

public void openWindow(String pageDescriptorId)

createNewWindow

protected ApplicationWindow createNewWindow()

getWindowManager

public WindowManager getWindowManager()

getActiveWindow

public ApplicationWindow getActiveWindow()
ActiveWindow is tracked by windowManager. When a window gains focus, the manager will receive this window as the active one.

Returns:
the activeWindow.

close

public void close()

close

public void close(boolean force,
                  int exitCode)

start

public void start()
Starts this application.



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