ptolemy.actor.gui
Class PtolemyApplication

java.lang.Object
  extended byptolemy.actor.gui.MoMLApplication
      extended byptolemy.actor.gui.PtolemyApplication

public class PtolemyApplication
extends MoMLApplication

This application opens run control panels for models specified on the command line. The exact facilities that are available are determined by the configuration file ptolemy/configs/runPanelConfiguration.xml, which is loaded before any command-line arguments are processed. If there are no command-line arguments at all, then the file ptolemy/configs/runBlankConfiguration.xml is read instead.

Since:
Ptolemy II 0.4
Version:
$Id: PtolemyApplication.java,v 1.47 2004/04/13 03:00:05 cxh Exp $
Author:
Edward A. Lee and Steve Neuendorffer
See Also:
ModelFrame, RunTableau
Accepted Rating:
Red (eal)
Proposed Rating:
Yellow (eal)

Field Summary
 
Fields inherited from class ptolemy.actor.gui.MoMLApplication
_basePath, _commandFlags, _commandOptions, _commandTemplate, _config, _parser, _test
 
Constructor Summary
PtolemyApplication(java.lang.String[] args)
          Parse the specified command-line arguments, creating models and frames to interact with them.
 
Method Summary
protected  Configuration _createDefaultConfiguration()
          Return a default Configuration, which in this case is given by the MoML file ptolemy/configs/runPanelConfiguration.xml.
protected  Configuration _createEmptyConfiguration()
          Return a default Configuration to use when there are no command-line arguments, which in this case is the same as the default configuration given by _createDefaultConfiguration, but with the additional contents of the file ptolemy/configs/runWelcomeWindow.xml.
protected  void _parseArgs(java.lang.String[] args)
          Parse the command-line arguments.
static void main(java.lang.String[] args)
          Create a new instance of this application, passing it the command-line arguments.
 
Methods inherited from class ptolemy.actor.gui.MoMLApplication
_configurationUsage, _parseArg, _readConfiguration, _usage, specToURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PtolemyApplication

public PtolemyApplication(java.lang.String[] args)
                   throws java.lang.Exception
Parse the specified command-line arguments, creating models and frames to interact with them.

Parameters:
args - The command-line arguments.
Throws:
java.lang.Exception - If command line arguments have problems.
Method Detail

main

public static void main(java.lang.String[] args)
Create a new instance of this application, passing it the command-line arguments.

Parameters:
args - The command-line arguments.

_createDefaultConfiguration

protected Configuration _createDefaultConfiguration()
                                             throws java.lang.Exception
Return a default Configuration, which in this case is given by the MoML file ptolemy/configs/runPanelConfiguration.xml. That configuration supports executing, but not editing, Ptolemy models.

Overrides:
_createDefaultConfiguration in class MoMLApplication
Returns:
A default configuration.
Throws:
java.lang.Exception - If the configuration cannot be opened.

_createEmptyConfiguration

protected Configuration _createEmptyConfiguration()
                                           throws java.lang.Exception
Return a default Configuration to use when there are no command-line arguments, which in this case is the same as the default configuration given by _createDefaultConfiguration, but with the additional contents of the file ptolemy/configs/runWelcomeWindow.xml.

Overrides:
_createEmptyConfiguration in class MoMLApplication
Returns:
A configuration for when there no command-line arguments.
Throws:
java.lang.Exception - If the configuration cannot be opened.

_parseArgs

protected void _parseArgs(java.lang.String[] args)
                   throws java.lang.Exception
Parse the command-line arguments. This overrides the base class only to set the usage information.

Overrides:
_parseArgs in class MoMLApplication
Throws:
java.lang.Exception - If an argument is not understood or triggers an error.