Class MoMLSimpleApplication

  • All Implemented Interfaces:
    ExecutionListener, ChangeListener

    @Deprecated
    public class MoMLSimpleApplication
    extends MoMLSimpleApplication
    Deprecated.
    Use MoMLSimpleApplication instead. MoMLSimpleApplication does not depend on anything in actor.gui
    A simple application that reads in a .xml file as a command line argument and runs it.

    MoMLApplication sets the look and feel, which starts up Swing, so we can't use MoMLApplication for non-graphical simulations.

    We implement the ChangeListener interface so that this class will get exceptions thrown by failed change requests. For example to use this class, try:

     java -classpath $PTII ptolemy.actor.gui.MoMLSimpleApplication ../../../ptolemy/domains/sdf/demo/OrthogonalCom/OrthogonalCom.xml
     
    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Christopher Hylands
    Pt.AcceptedRating:
    Red (eal)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • MoMLSimpleApplication

        public MoMLSimpleApplication()
                              throws java.lang.Exception
        Deprecated.
        A Nullary constructor is necessary so that we can extends this base class with a subclass.
        Throws:
        java.lang.Exception - Not thrown in this base class
      • MoMLSimpleApplication

        public MoMLSimpleApplication​(java.lang.String xmlFileName)
                              throws java.lang.Throwable
        Deprecated.
        Parse the xml file and run it.
        Parameters:
        xmlFileName - A string that refers to an MoML file that contains a Ptolemy II model. The string should be a relative pathname.
        Throws:
        java.lang.Throwable - If there was a problem parsing or running the model.