|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ptolemy.gui.StreamExec
Execute commands in a subprocess. This class does not use swing,
for a graphical interface, see the derived class JTextAreaExec
.
Loosely based on Example1.java from http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
See also http://developer.java.sun.com/developer/qow/archive/135/index.jsp and http://jw.itworld.com/javaworld/jw-12-2000/jw-1229-traps.html
JTextAreaExec
Constructor Summary | |
StreamExec()
Create a StreamExec |
Method Summary | |
protected void |
_setProgressBarMaximum(int size)
Set the maximum of the progress bar. |
void |
cancel()
Cancel any running commands. |
void |
clear()
Clear the text area, status bar and progress bar. |
java.lang.Process |
getProcess()
Return the value of the Process. |
static void |
main(java.lang.String[] args)
Main method used for testing. |
void |
setCommands(java.util.List commands)
Set the list of commands. |
void |
start()
Start running the commands. |
void |
stderr(java.lang.String text)
Append the text message to stderr. |
void |
stdout(java.lang.String text)
Append the text message to the output. |
void |
updateStatusBar(java.lang.String text)
Set the text of the status bar. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamExec()
Method Detail |
public void cancel()
public void clear()
public java.lang.Process getProcess()
public static void main(java.lang.String[] args)
java -classpath $PTII ptolemy.gui.StreamExec
public void setCommands(java.util.List commands)
public void start()
public void stderr(java.lang.String text)
public void stdout(java.lang.String text)
public void updateStatusBar(java.lang.String text)
protected void _setProgressBarMaximum(int size)
size
- The maximum size of the progress bar.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |