|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.actor.gui.MoMLSimpleApplication
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
| Red (eal) |
| Red (cxh) |
| Constructor Summary | |
MoMLSimpleApplication()
A Nullary constructor is necessary so that we can extends this base class with a subclass |
|
MoMLSimpleApplication(java.lang.String xmlFileName)
Parse the xml file and run it. |
|
| Method Summary | |
void |
changeExecuted(ChangeRequest change)
React to a change request has been successfully executed by doing nothing. |
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
React to a change request that has resulted in an exception. |
static void |
main(java.lang.String[] args)
Create an instance of a single model and run it |
void |
rerun()
Execute the same model again. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MoMLSimpleApplication()
throws java.lang.Exception
java.lang.Exception - Not thrown in this base class
public MoMLSimpleApplication(java.lang.String xmlFileName)
throws java.lang.Exception
xmlFileName - A string that refers to an MoML file that
contains a Ptolemy II model. The string should be
a relative pathname.
java.lang.Exception - If there was a problem parsing
or running the model.| Method Detail |
public void changeExecuted(ChangeRequest change)
changeExecuted in interface ChangeListenerchange - The change that has been executed, or null if
the change was not done via a ChangeRequest.
public void changeFailed(ChangeRequest change,
java.lang.Exception exception)
changeFailed in interface ChangeListenerchange - The change that was attempted or null if
the change was not done via a ChangeRequest.exception - The exception that resulted.public static void main(java.lang.String[] args)
args - The command-line arguments naming the .xml file to run
public void rerun()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||