Package jmri.script.swing
Class ScriptOutput
- java.lang.Object
-
- jmri.script.swing.ScriptOutput
-
public class ScriptOutput extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ScriptOutput()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScriptOutput
getDefault()
javax.swing.JTextArea
getOutputArea()
Provide access to the JTextArea containing all ScriptEngine output.static void
writeScript(java.lang.String script)
Write a script to the output area.
-
-
-
Constructor Detail
-
ScriptOutput
public ScriptOutput()
-
-
Method Detail
-
getOutputArea
public javax.swing.JTextArea getOutputArea()
Provide access to the JTextArea containing all ScriptEngine output.The output JTextArea is not created until this is invoked, so that code that doesn't use this feature can run on GUI-less machines.
This creates a "ScriptOutput PipeListener" thread which is not normally terminated.
- Returns:
- component containing script output
-
getDefault
public static ScriptOutput getDefault()
-
writeScript
public static void writeScript(java.lang.String script)
Write a script to the output area. The output is prepended with a leading ">>>" on the first line and a leading ellipsis on subsequent lines.- Parameters:
script
- The script to write.
-
-