Class MoMLApplication

  • All Implemented Interfaces:
    ExecutionListener
    Direct Known Subclasses:
    PtExecuteApplication, PtolemyApplication, VergilApplication

    public class MoMLApplication
    extends ConfigurationApplication
    An application that sets the look and feel to the native look and feel and then reads one or more files specified on the command line, or instantiates one or more Java classes specified by the -class option.

    This class sets the look and feel of the user interface (UI) to the native look and feel. Thus, this class invokes Java's user interface code which means that this class should be run in an environment that has a display. To run in a environment that has no display, see the ConfigurationApplication parent class.

    For complete usage, see the ConfigurationApplication parent class.

    Since:
    Ptolemy II 0.4
    Version:
    $Id$
    Author:
    Edward A. Lee and Steve Neuendorffer, Contributor: Christopher Hylands
    See Also:
    Configuration
    Pt.AcceptedRating:
    Red (eal)
    Pt.ProposedRating:
    Yellow (eal)
    • Constructor Detail

      • MoMLApplication

        public MoMLApplication​(java.lang.String[] args)
                        throws java.lang.Exception
        Parse the specified command-line arguments, instantiating classes and reading files that are specified.
        Parameters:
        args - The command-line arguments.
        Throws:
        java.lang.Exception - If command line arguments have problems.
      • MoMLApplication

        public MoMLApplication​(java.lang.String basePath,
                               java.lang.String[] args)
                        throws java.lang.Exception
        Parse the specified command-line arguments, instantiating classes and reading files that are specified.
        Parameters:
        basePath - The basePath to look for configurations in, usually "ptolemy/configs", but other tools might have other configurations in other directories
        args - The command-line arguments.
        Throws:
        java.lang.Exception - If command line arguments have problems.
      • MoMLApplication

        public MoMLApplication​(java.lang.String basePath,
                               java.lang.String[] args,
                               MessageHandler messageHandler,
                               ErrorHandler errorHandler)
                        throws java.lang.Exception
        Parse the specified command-line arguments, instantiating classes and reading files that are specified.
        Parameters:
        basePath - The basePath to look for configurations in, usually "ptolemy/configs", but other tools might have other configurations in other directories
        args - The command-line arguments.
        messageHandler - The message handler.
        errorHandler - The MoML error handler.
        Throws:
        java.lang.Exception - If command line arguments have problems.
    • Method Detail

      • _initializeApplication

        protected void _initializeApplication()
        Set the look and feel to the native look and feel. This method is called by early in the constructor, so the object may not be completely constructed, so derived classes should not access fields from a parent class.
        Overrides:
        _initializeApplication in class ConfigurationApplication