com.tensegrity.skeleton.swing.launch
Class InitFrameLaunchTask

java.lang.Object
  extended bycom.tensegrity.gui.launch.LaunchTask
      extended bycom.tensegrity.skeleton.swing.launch.AbstractLaunchTask
          extended bycom.tensegrity.skeleton.swing.launch.InitFrameLaunchTask

public class InitFrameLaunchTask
extends AbstractLaunchTask

Initializes the GUI of an ApplicationFrame.

Version:
$Id: InitFrameLaunchTask.java,v 1.30 2006/01/05 12:33:31 BurkhardWick Exp $
Author:
GillesIachelini, Stepan Rutz

Nested Class Summary
static class InitFrameLaunchTask.DockContainerViewConfig
          This class configures a view of an existing Container for the dock-mdi framework.
 
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
InitFrameLaunchTask(ApplicationFrame applicationFrame)
          Creates a new InitFrameLaunchTask.
 
Method Summary
 InitFrameLaunchTask.DockContainerViewConfig[] getDockConfigs()
          This method is relevant only of if the dock-gui is enabled.
 void loadViewConfig()
          This method loads the view-config that is stored inside the preferences.
 void postCreate(java.lang.Object object)
          This method is called right before the run method is finished.
 int run()
          The run method of this launch task.
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask
findResourceText, getApplicationFrame, getName, getStatusPrefix, getStatusPrefixResourceKey
 
Methods inherited from class com.tensegrity.gui.launch.LaunchTask
getError, getStatusDetails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitFrameLaunchTask

public InitFrameLaunchTask(ApplicationFrame applicationFrame)
Creates a new InitFrameLaunchTask.

Parameters:
applicationFrame - Application context for this LaunchTask.
Method Detail

run

public final int run()
              throws java.lang.Exception
Description copied from class: LaunchTask
The run method of this launch task. The returned status indicates what the invoker is supposed to do after the task executed.

Specified by:
run in class LaunchTask
Returns:
one of the LAUNCHTASKSTATUS_* constants defined in this interface.
Throws:
java.lang.Exception

postCreate

public void postCreate(java.lang.Object object)
Description copied from class: AbstractLaunchTask
This method is called right before the run method is finished. This method is an entry point to modify a created item.

Specified by:
postCreate in class AbstractLaunchTask
Parameters:
object -

getDockConfigs

public InitFrameLaunchTask.DockContainerViewConfig[] getDockConfigs()
This method is relevant only of if the dock-gui is enabled. This is true when the method LNFConfiguration.getMDIStyle() returns LNFConfiguration.MDISTYLE_DOCK.

This method returns an array of InitFrameLaunchTask.DockContainerViewConfigs. This instances each represent a configuration of a view in the mdi-dock. A view is a window that wraps a tensegrity Container inside of it. The configuration instance define a symbolic name (entrytag) to the Container, a preferred tab-pane name, an optional icon and a display string.

Subclasses of InitFrameLaunchTask can override this method to provide their own default mapping of containers to views and preferred tabpanes.

Returns:
An array containing all configurations

loadViewConfig

public void loadViewConfig()
This method loads the view-config that is stored inside the preferences. If the view-config can't be loaded or doesnt exist the method prints an error message and returns silently. If the current configuration as returned by LNFConfiguration.getMDIStyle() is not the dock-mdi style, this method returns silently without performing any work.



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