Interface DisplayInterface

  • All Known Implementing Classes:
    DisplayJavaSE

    public interface DisplayInterface
    Interface for implementing platform dependent parts of the display actor.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Ishwinder Singh
    Pt.AcceptedRating:
    Yellow (ishwinde)
    Pt.ProposedRating:
    Yellow (ishwinde)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cleanUp()
      Free up memory when closing.
      void display​(java.lang.String tokenValue)
      Append the string value of the token to the text area on the screen.
      java.lang.Object getTextArea()
      Return the object of the containing text area.
      void init​(Display display)
      Set the number of rows for the text area.
      void openWindow()
      Open the display window if it has not been opened.
      void place​(PortableContainer container)
      Specify the container in which the data should be displayed.
      void remove()
      Remove the display from the current container, if there is one.
      void setColumns​(int numberOfColumns)
      Set the desired number of columns of the textArea, if there is one.
      void setRows​(int numberOfRows)
      Set the desired number of rows of the textArea, if there is one.
      void setTitle​(java.lang.String stringValue)
      Set the title of the window.
    • Method Detail

      • cleanUp

        void cleanUp()
        Free up memory when closing.
      • display

        void display​(java.lang.String tokenValue)
        Append the string value of the token to the text area on the screen. Each value is terminated with a newline character.
        Parameters:
        tokenValue - The string to be displayed
      • getTextArea

        java.lang.Object getTextArea()
        Return the object of the containing text area.
        Returns:
        the text area.
      • place

        void place​(PortableContainer container)
        Specify the container in which the data should be displayed. An instance of JTextArea will be added to that container. This method needs to be called before the first call to initialize(). Otherwise, an instance of JTextArea will be placed in its own frame. The text area is also placed in its own frame if this method is called with a null argument. The background of the text area is set equal to that of the container (unless it is null).
        Parameters:
        container - The container into which to place the text area, or null to specify that there is no current container.
      • remove

        void remove()
        Remove the display from the current container, if there is one.
      • setColumns

        void setColumns​(int numberOfColumns)
                 throws IllegalActionException
        Set the desired number of columns of the textArea, if there is one.
        Parameters:
        numberOfColumns - The new value of the attribute.
        Throws:
        IllegalActionException - If the specified attribute is rowsDisplayed and its value is not positive.
      • setRows

        void setRows​(int numberOfRows)
              throws IllegalActionException
        Set the desired number of rows of the textArea, if there is one.
        Parameters:
        numberOfRows - The new value of the attribute.
        Throws:
        IllegalActionException - If the specified attribute is rowsDisplayed and its value is not positive.
      • setTitle

        void setTitle​(java.lang.String stringValue)
               throws IllegalActionException
        Set the title of the window.

        If the title parameter is set to the empty string, and the Display window has been rendered, then the title of the Display window will be updated to the value of the name parameter.

        Parameters:
        stringValue - The title to be set.
        Throws:
        IllegalActionException - If the title cannot be set.