Package jexer

Class TTextPictureWindow

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>, Scrollable

    public class TTextPictureWindow
    extends TScrollableWindow
    TTextPictureWindow shows an ASCII/ANSI art file with scrollbars.
    • Constructor Detail

      • TTextPictureWindow

        public TTextPictureWindow​(TApplication parent,
                                  java.lang.String filename)
                           throws java.io.IOException
        Public constructor opens a file.
        Parameters:
        parent - the main application
        filename - the file to open
        Throws:
        java.io.IOException - if a java.io operation throws
      • TTextPictureWindow

        public TTextPictureWindow​(TApplication parent,
                                  java.lang.String filename,
                                  int x,
                                  int y,
                                  int width,
                                  int height)
                           throws java.io.IOException
        Public constructor opens a file.
        Parameters:
        parent - the main application
        filename - the file to open
        x - column relative to parent
        y - row relative to parent
        width - width of window
        height - height of window
        Throws:
        java.io.IOException - if a java.io operation throws
    • Method Detail

      • onMouseDown

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

        public void onMouseUp​(TMouseEvent mouse)
        Handle mouse release events.
        Overrides:
        onMouseUp in class TWindow
        Parameters:
        mouse - mouse button release event
      • onMouseMotion

        public void onMouseMotion​(TMouseEvent mouse)
        Method that subclasses can override to handle mouse movements.
        Overrides:
        onMouseMotion in class TWindow
        Parameters:
        mouse - mouse motion event
      • onKeypress

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

        public void draw()
        Draw the window.
        Overrides:
        draw in class TWindow