Class TextDisplayHelper


  • public class TextDisplayHelper
    extends HelperBase
    Helper for the textDisplay JavaScript module. This causes a window to open that is used to display the text. The window can be resized and repositioned and the size and position will be remembered.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Edward A. Lee, based on DisplayJavaSE.
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • textArea

        public transient javax.swing.JTextArea textArea
        The text area in which the data will be displayed.
    • Constructor Detail

      • TextDisplayHelper

        public TextDisplayHelper​(java.lang.Object actor,
                                 jdk.nashorn.api.scripting.ScriptObjectMirror currentObj)
        Create a text display with no title.
        Parameters:
        actor - The JavaScript actor associated with this helper.
        currentObj - The JavaScript object that this is helping (a TextDisplay).
      • TextDisplayHelper

        public TextDisplayHelper​(java.lang.Object actor,
                                 jdk.nashorn.api.scripting.ScriptObjectMirror currentObj,
                                 java.lang.String title)
        Create a text display with the specified title.
        Parameters:
        actor - The JavaScript actor associated with this helper.
        currentObj - The JavaScript object that this is helping (a TextDisplay).
        title - A title to associate with the display.
    • Method Detail

      • appendText

        public void appendText​(java.lang.String text)
        Append to any text already displayed starting on a new line.
        Parameters:
        text - The text to be displayed.
      • displayText

        public void displayText​(java.lang.String text)
        Display text.
        Parameters:
        text - The text to be displayed.