Package ptolemy.actor.gui
Class PtolemyApplication
- java.lang.Object
-
- ptolemy.actor.gui.ConfigurationApplication
-
- ptolemy.actor.gui.MoMLApplication
-
- 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$
- Author:
- Edward A. Lee and Steve Neuendorffer
- See Also:
ModelFrame
,RunTableau
- Pt.AcceptedRating:
- Red (eal)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.actor.gui.ConfigurationApplication
ConfigurationApplication.IgnoreErrorHandler
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.gui.ConfigurationApplication
_basePath, _commandFlagsWithDescriptions, _commandOptions, _commandTemplate, _configuration, _exit, _parser, _printPDF, _run, _run20x, _statistics, _test
-
-
Constructor Summary
Constructors Constructor Description PtolemyApplication(java.lang.String arg)
Parse the specified command-line arguments, creating models and frames to interact with them.PtolemyApplication(java.lang.String[] args)
Parse the specified command-line arguments, creating models and frames to interact with them.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, closeModelWithoutSavingOrExiting, configurationDirectories, configurationDirectoryFullOrFirst, executionError, executionFinished, getActiveCount, managerStateChanged, models, openModel, openModelOrEntity, readConfiguration, runModels, setActiveCount, specToURL, throwArgsException, waitForFinish
-
-
-
-
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. SeeConfigurationApplication
for a description of the command-line arguments.- Throws:
java.lang.Exception
- If command line arguments have problems.
-
PtolemyApplication
public PtolemyApplication(java.lang.String arg) throws java.lang.Exception
Parse the specified command-line arguments, creating models and frames to interact with them.- Parameters:
arg
- The command-line argument, typically the name of the model to open. SeeConfigurationApplication
for a description of 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 classConfigurationApplication
- 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 classConfigurationApplication
- 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 classConfigurationApplication
- Parameters:
args
- The command-line arguments to be parsed.- Throws:
java.lang.Exception
- If an argument is not understood or triggers an error.
-
-