com.tensegrity.skeleton.swing.launch
Class LoadStylesLaunchTask

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

public class LoadStylesLaunchTask
extends LoadFileLaunchTask

Loads the styles.xml of the skeleton.

Version:
$Id: LoadStylesLaunchTask.java,v 1.10 2005/05/02 16:17:38 AndreasEbbert 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
LoadStylesLaunchTask(ApplicationFrame applicationFrame)
          Creates the LoadStylesLaunchTask.
LoadStylesLaunchTask(ApplicationFrame applicationFrame, java.lang.String filename, java.lang.Class loadClass)
          Creates the LoadStylesLaunchTask for the given ApplicationFrame based on the given filename and class instance used to load the file.
 
Method Summary
protected  java.lang.String getFilename()
          Subclasses may override this method to provide a custom styles xml file.
protected  java.lang.Class getLoadClass()
          When loading resource from jar files or other locations you may need a Class instance.
 void postCreate(java.lang.Object object)
          Receives no parameter since the GraphStyleService is a static class.
 int run()
          The run method of this launch task.
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.LoadFileLaunchTask
getName
 
Methods inherited from class com.tensegrity.skeleton.swing.launch.AbstractLaunchTask
findResourceText, getApplicationFrame, 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

LoadStylesLaunchTask

public LoadStylesLaunchTask(ApplicationFrame applicationFrame)
Creates the LoadStylesLaunchTask.

Parameters:
applicationFrame - Application context for this LaunchTask.

LoadStylesLaunchTask

public LoadStylesLaunchTask(ApplicationFrame applicationFrame,
                            java.lang.String filename,
                            java.lang.Class loadClass)
Creates the LoadStylesLaunchTask for the given ApplicationFrame based on the given filename and class instance used to load the file.

Parameters:
applicationFrame - Application context for this LaunchTask.
filename - a String which describes a filename.
loadClass - the resource class to use for loading.
Method Detail

postCreate

public void postCreate(java.lang.Object object)
Receives no parameter since the GraphStyleService is a static class. Users, who wants to modify the list of styles (add, modify or remove items), may do that in the postCreate of this class.

Specified by:
postCreate in class AbstractLaunchTask
Parameters:
object -
See Also:
AbstractLaunchTask.postCreate(Object)

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

getFilename

protected java.lang.String getFilename()
Subclasses may override this method to provide a custom styles xml file. NOTE: Either you specify the full filename (Disk/Path/filename) or you *must* override the getLoadClass() method as well

Overrides:
getFilename in class LoadFileLaunchTask
Returns:
String the filename as string.

getLoadClass

protected java.lang.Class getLoadClass()
Description copied from class: LoadFileLaunchTask
When loading resource from jar files or other locations you may need a Class instance. Return null to load from absolute file.

Overrides:
getLoadClass in class LoadFileLaunchTask
Returns:
Class the class to use as resource loader.


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