ptolemy.actor.gui
Class PtolemyApplication

java.lang.Object
  extended by ptolemy.actor.gui.ConfigurationApplication
      extended by ptolemy.actor.gui.MoMLApplication
          extended by ptolemy.actor.gui.PtolemyApplication
All Implemented Interfaces:
ExecutionListener

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 57040 2010-01-27 20:52:32Z cxh $
Author:
Edward A. Lee and Steve Neuendorffer
See Also:
ModelFrame, RunTableau
Accepted Rating:
Red (eal)
Proposed Rating:
Yellow (eal)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.actor.gui.ConfigurationApplication
ConfigurationApplication.ConfigurationFilenameFilter, ConfigurationApplication.IgnoreErrorHandler
 
Field Summary
 
Fields inherited from class ptolemy.actor.gui.ConfigurationApplication
_basePath, _commandFlagsWithDescriptions, _commandOptions, _commandTemplate, _configuration, _exit, _parser, _printPDF, _run, _statistics, _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
_initializeApplication
 
Methods inherited from class ptolemy.actor.gui.ConfigurationApplication
_configurationUsage, _configurationUsage, _openModel, _openModel, _parseArg, _printPDF, _readConfiguration, _usage, executionError, executionFinished, managerStateChanged, models, readConfiguration, runModels, specToURL, throwArgsException, waitForFinish
 
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 ConfigurationApplication
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 ConfigurationApplication
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 ConfigurationApplication
Parameters:
args - The command-line arguments to be parsed.
Throws:
java.lang.Exception - If an argument is not understood or triggers an error.