Class ScriptingPanel

    • Constructor Detail

      • ScriptingPanel

        public ScriptingPanel()
        Default constructor.
    • Method Detail

      • terminate

        public void terminate()
        Terminates this panel, i.e., terminates the output threads it started. Removes the output and error streams from the corresponding tees as well so that garbage collection succeeds.
      • getIcon

        public abstract ImageIcon getIcon()
        Returns an icon to be used in a frame.
        Returns:
        the icon
      • getTitle

        public abstract String getTitle()
        Returns the current title for the frame/dialog.
        Returns:
        the title
      • getOutput

        public abstract JTextPane getOutput()
        Returns the text area that is used for displaying output on stdout and stderr.
        Returns:
        the JTextArea
      • getMenuBar

        public abstract JMenuBar getMenuBar()
        Returns the menu bar to to be displayed in the frame.
        Returns:
        the menu bar, null if not applicable
      • setDebug

        public void setDebug​(boolean value)
        Turns on/off debugging mode.
        Parameters:
        value - if true, debug mode is turned on
      • getDebug

        public boolean getDebug()
        Returns whether debugging mode is on.
        Returns:
        true if debug mode is turned on
      • addTitleUpdatedListener

        public void addTitleUpdatedListener​(TitleUpdatedListener l)
        Adds the listener to the internal list.
        Parameters:
        l - the listener to add
      • removeTitleUpdatedListener

        public void removeTitleUpdatedListener​(TitleUpdatedListener l)
        Removes the listener from the internal list.
        Parameters:
        l - the listener to remove
      • showPanel

        public static void showPanel​(ScriptingPanel panel,
                                     String[] args)
        Displays the panel in a frame.
        Parameters:
        panel - the panel to display
        args - currently ignored commandline parameters
      • showPanel

        public static void showPanel​(ScriptingPanel panel,
                                     String[] args,
                                     int width,
                                     int height)
        Displays the panel in a frame.
        Parameters:
        panel - the panel to display
        args - currently ignored commandline parameters
        width - the width of the frame
        height - the height of the frame