org.viewaframework.core
Class AbstractApplicationLauncher

java.lang.Object
  extended by javax.swing.SwingWorker<Application,SplashStatus>
      extended by org.viewaframework.core.AbstractApplicationLauncher
All Implemented Interfaces:
Runnable, Future<Application>, RunnableFuture<Application>, ApplicationLauncher
Direct Known Subclasses:
DefaultApplicationLauncher, SpringApplicationLauncher

public abstract class AbstractApplicationLauncher
extends SwingWorker<Application,SplashStatus>
implements ApplicationLauncher

This is the launcher of the Application. It launches the application lifecycle in a new Thread.

Since:
1.0
Author:
Mario Garcia

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Field Summary
 
Fields inherited from interface org.viewaframework.core.ApplicationLauncher
APPLICATION_BUNDLE_NAME, APPLICATION_LOCALE, APPLICATION_NAME, APPLICATION_SPLASH, APPLICATION_VERSION, LOCALE_SEPARATOR, SPLASH_KEY_MESSAGE_OPENING, SPLASH_KEY_MESSAGE_PREPARE, SPLASH_KEY_MESSAGE_PREPAREUI, SPLASH_KEY_MESSAGE_STARTING, SPLASH_KEY_VALUE_DEFAULT_PROGRESS_COLOR, SPLASH_KEY_VALUE_DEFAULT_TEXT_COLOR, SPLASH_KEY_VALUE_DEFAULT_TEXT_SIZE, SPLASH_KEY_VALUE_PROGRESS_COLOR, SPLASH_KEY_VALUE_TEXT_COLOR, SPLASH_KEY_VALUE_TEXT_SIZE, SPLASH_VALUE_DEFAULT_PROGRESS_COLOR, SPLASH_VALUE_DEFAULT_TEXT_COLOR, SPLASH_VALUE_DEFAULT_TEXT_SIZE, VIEWA_FILE_NAME
 
Constructor Summary
AbstractApplicationLauncher()
           
 
Method Summary
protected  Application doInBackground()
           
protected  void done()
           
 Application execute(Class<? extends Application> app)
           
abstract  Application getApplication()
           
 LookAndFeel getLookAndFeel()
          If anyone wants to execute an application with a certain look and feel then it has to be set in this method.
protected  void process(List<SplashStatus> chunks)
           
 void renderSplashFrame(Graphics2D g, String message, int frame, Map<String,Integer> coor)
          This method paints messages and progress bar in the splash screen
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractApplicationLauncher

public AbstractApplicationLauncher()
Throws:
Exception
Method Detail

doInBackground

protected Application doInBackground()
                              throws Exception
Specified by:
doInBackground in class SwingWorker<Application,SplashStatus>
Throws:
Exception

done

protected void done()
Overrides:
done in class SwingWorker<Application,SplashStatus>

execute

public Application execute(Class<? extends Application> app)
                    throws Exception
Specified by:
execute in interface ApplicationLauncher
Throws:
Exception

getApplication

public abstract Application getApplication()
                                    throws ApplicationException
Returns:
Throws:
ApplicationException

getLookAndFeel

public LookAndFeel getLookAndFeel()
If anyone wants to execute an application with a certain look and feel then it has to be set in this method.

Returns:

process

protected void process(List<SplashStatus> chunks)
Overrides:
process in class SwingWorker<Application,SplashStatus>

renderSplashFrame

public void renderSplashFrame(Graphics2D g,
                              String message,
                              int frame,
                              Map<String,Integer> coor)
This method paints messages and progress bar in the splash screen

Parameters:
g -
message -
frame -
coor -


Copyright © 2010. All Rights Reserved.