com.tensegrity.skeleton.swing.launch
Class AbstractLaunchTask

java.lang.Object
  extended bycom.tensegrity.gui.launch.LaunchTask
      extended bycom.tensegrity.skeleton.swing.launch.AbstractLaunchTask
Direct Known Subclasses:
AbstractToolBarLaunchTask, CommandLaunchTask, FlatMetalLaunchTask, InitFrameLaunchTask, LayoutPoolElementsLaunchTask, LayoutToolsLaunchTask, LoadFileLaunchTask, LoadFileLaunchTask, MenuLaunchTask, RepositoryLaunchTask, SetPreferencesLaunchTask, SwtAttributeTreeLaunchTask, SwtCommandLaunchTask, SwtInitGUILaunchTask, SwtInitMDIComponentLaunchTask, SwtLayoutToolsLaunchTask, SwtMenuLaunchTask, SwtNavigatorLaunchTask, SwtRepositoryLaunchTask, SwtSetPreferencesLaunchTask, SwtToolBarLaunchTask

public abstract class AbstractLaunchTask
extends LaunchTask

This abstract class represents a LaunchTask with an direct association to an ApplicationFrame. An AbstractLaunchTask defines an entry point for subclasses to modify the created item in the run method. The idea is that subclasses execute their run method and then pass the created object to the postCreate method to allow for modifications of a previously created item.

Version:
$Id: AbstractLaunchTask.java,v 1.9 2005/08/08 16:36:36 BurkhardWick Exp $
Author:
GillesIachelini

Field Summary
 
Fields inherited from class com.tensegrity.gui.launch.LaunchTask
lasterror, LAUNCHTASKSTATUS_FATAL, LAUNCHTASKSTATUS_FATAL_RETRY, LAUNCHTASKSTATUS_SERIOUS, LAUNCHTASKSTATUS_SERIOUS_RETRY, LAUNCHTASKSTATUS_SHUTDOWN, LAUNCHTASKSTATUS_SUCCESS, LAUNCHTASKSTATUS_WARNING
 
Constructor Summary
AbstractLaunchTask(ApplicationFrame applicationFrame)
          Creates a new AbstractLaunchTask associated with the given ApplicationFrame.
AbstractLaunchTask(ApplicationFrame applicationFrame, java.lang.String nameKey)
          Creates a new AbstractLaunchTask associated with the given ApplicationFrame.
 
Method Summary
protected  java.lang.String findResourceText(java.lang.String key, java.lang.String defText)
          Returns a text from the UIManager or defText if no corresponding entry exists.
protected  ApplicationFrame getApplicationFrame()
          Returns the ApplicationFrame associated with this LaunchTask.
 java.lang.String getName()
          Returns the name of this launch task.
 java.lang.String getStatusPrefix()
          Returns the prefix that is shown before the name of the launch task in the status text of the application launcher.
protected  java.lang.String getStatusPrefixResourceKey()
          Override this method to set a resource key for the prefix of the status text rather than setting the text to a fixed value.
abstract  void postCreate(java.lang.Object object)
          This method is called right before the run method is finished.
 
Methods inherited from class com.tensegrity.gui.launch.LaunchTask
getError, getStatusDetails, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLaunchTask

public AbstractLaunchTask(ApplicationFrame applicationFrame)
Creates a new AbstractLaunchTask associated with the given ApplicationFrame. Throws a IllegalArgumentException if the parameter is null.

Parameters:
applicationFrame - a valid instance of ApplicationFrame.

AbstractLaunchTask

public AbstractLaunchTask(ApplicationFrame applicationFrame,
                          java.lang.String nameKey)
Creates a new AbstractLaunchTask associated with the given ApplicationFrame. Throws a IllegalArgumentException if the parameter is null.

Parameters:
applicationFrame - a valid instance of ApplicationFrame.
nameKey - the resource key for the name of this launchtask
Method Detail

getName

public java.lang.String getName()
Description copied from class: LaunchTask
Returns the name of this launch task.

Specified by:
getName in class LaunchTask
Returns:
the name of this launch task.

getApplicationFrame

protected final ApplicationFrame getApplicationFrame()
Returns the ApplicationFrame associated with this LaunchTask.

Returns:
ApplicationFrame

getStatusPrefix

public java.lang.String getStatusPrefix()
Description copied from class: LaunchTask
Returns the prefix that is shown before the name of the launch task in the status text of the application launcher. Per default this is "Initializing: "

Overrides:
getStatusPrefix in class LaunchTask
Returns:
the prefix that is shown before the name of the launch task in the status text of the application launcher.

getStatusPrefixResourceKey

protected java.lang.String getStatusPrefixResourceKey()
Override this method to set a resource key for the prefix of the status text rather than setting the text to a fixed value.

Returns:
the key of the text to use for the prefix of the status text

findResourceText

protected final java.lang.String findResourceText(java.lang.String key,
                                                  java.lang.String defText)
Returns a text from the UIManager or defText if no corresponding entry exists.

Parameters:
key - The key to get the text resource for
defText - The default text to use when there is no text for the given key
Returns:
The text from the UIManager or defText if no corresponding entry exists.

postCreate

public abstract void postCreate(java.lang.Object object)
This method is called right before the run method is finished. This method is an entry point to modify a created item.

Parameters:
object -

Find more information in the class documentation



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.