Package jexer

Class TTextPicture

    • Constructor Detail

      • TTextPicture

        public TTextPicture​(TWidget parent,
                            java.lang.String filename,
                            int x,
                            int y,
                            int width,
                            int height)
        Public constructor.
        Parameters:
        parent - parent widget
        filename - the file containing the picture data
        x - column relative to parent
        y - row relative to parent
        width - width of text area
        height - height of text area
    • Method Detail

      • onKeypress

        public void onKeypress​(TKeypressEvent keypress)
        Handle keystrokes.
        Overrides:
        onKeypress in class TWidget
        Parameters:
        keypress - keystroke event
      • onMouseDown

        public void onMouseDown​(TMouseEvent mouse)
        Handle mouse press events.
        Overrides:
        onMouseDown in class TWidget
        Parameters:
        mouse - mouse button press event
      • close

        public void close()
        Handle widget close.
        Overrides:
        close in class TWidget
      • displayChanged

        public void displayChanged​(boolean cursorOnly)
        Called by emulator when fresh data has come in (request poll).
        Specified by:
        displayChanged in interface DisplayListener
        Parameters:
        cursorOnly - if true, the screen has not changed but the cursor may be on a different location.
      • updateDisplay

        public void updateDisplay​(java.util.List<DisplayLine> display)
        Called by emulator when fresh data has come in (push).
        Specified by:
        updateDisplay in interface DisplayListener
        Parameters:
        display - the updated display
      • getScrollBottom

        public int getScrollBottom()
        Function to call to obtain the number of rows from the bottom to scroll back when sending updates via updateDisplay().
        Specified by:
        getScrollBottom in interface DisplayListener
        Returns:
        the number of rows from the bottom to scroll back
      • getDisplayWidth

        public int getDisplayWidth()
        Function to call to obtain the display width.
        Specified by:
        getDisplayWidth in interface DisplayListener
        Returns:
        the number of columns in the display
      • getDisplayHeight

        public int getDisplayHeight()
        Function to call to obtain the display height.
        Specified by:
        getDisplayHeight in interface DisplayListener
        Returns:
        the number of rows in the display
      • draw

        public void draw()
        Draw the text box.
        Overrides:
        draw in class TWidget