001/* An application that executes non-graphical
002 models specified on the command line.
003
004 Copyright (c) 2001-2014 The Regents of the University of California.
005 All rights reserved.
006 Permission is hereby granted, without written agreement and without
007 license or royalty fees, to use, copy, modify, and distribute this
008 software and its documentation for any purpose, provided that the above
009 copyright notice and the following two paragraphs appear in all copies
010 of this software.
011
012 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
013 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
014 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
015 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
016 SUCH DAMAGE.
017
018 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
019 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
020 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
021 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
022 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
023 ENHANCEMENTS, OR MODIFICATIONS.
024
025 PT_COPYRIGHT_VERSION_2
026 COPYRIGHTENDKEY
027
028 */
029package ptolemy.actor.gui;
030
031//////////////////////////////////////////////////////////////////////////
032//// MoMLSimpleApplication
033
034/** A simple application that reads in a .xml file as a command
035 line argument and runs it.
036
037 <p>MoMLApplication sets the look and feel, which starts up Swing,
038 so we can't use MoMLApplication for non-graphical simulations.
039
040 <p>We implement the ChangeListener interface so that this
041 class will get exceptions thrown by failed change requests.
042
043 For example to use this class, try:
044 <pre>
045 java -classpath $PTII ptolemy.actor.gui.MoMLSimpleApplication ../../../ptolemy/domains/sdf/demo/OrthogonalCom/OrthogonalCom.xml
046 </pre>
047
048 @deprecated Use {@link ptolemy.moml.MoMLSimpleApplication} instead.
049 MoMLSimpleApplication does not depend on anything in actor.gui
050 @author Christopher Hylands
051 @version $Id$
052 @since Ptolemy II 2.0
053 @Pt.ProposedRating Red (cxh)
054 @Pt.AcceptedRating Red (eal)
055 */
056@Deprecated
057public class MoMLSimpleApplication extends ptolemy.moml.MoMLSimpleApplication {
058    /** A Nullary constructor is necessary so that we can extends this
059     *  base class with a subclass.
060     *  @exception Exception Not thrown in this base class
061     */
062    public MoMLSimpleApplication() throws Exception {
063    }
064
065    /** Parse the xml file and run it.
066     *  @param xmlFileName A string that refers to an MoML file that
067     *  contains a Ptolemy II model.  The string should be
068     *  a relative pathname.
069     *  @exception Throwable If there was a problem parsing
070     *  or running the model.
071     */
072    public MoMLSimpleApplication(String xmlFileName) throws Throwable {
073        super(xmlFileName);
074    }
075}