Class ScriptOutput

    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • 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.