Package jexer

Class TTableWindow

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

    public class TTableWindow
    extends TScrollableWindow
    TTableWindow is used to display and edit regular two-dimensional tables of cells.
    • Constructor Detail

      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.lang.String title)
        Public constructor sets window title.
        Parameters:
        parent - the main application
        title - the window title
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.io.File csvFile)
                     throws java.io.IOException
        Public constructor loads a grid from a RFC4180 CSV file.
        Parameters:
        parent - the main application
        csvFile - a File referencing the CSV data
        Throws:
        java.io.IOException - if a java.io operation throws
    • Method Detail

      • onFocus

        public void onFocus()
        Called by application.switchWindow() when this window gets the focus, and also by application.addWindow().
        Overrides:
        onFocus in class TWindow
      • onUnfocus

        public void onUnfocus()
        Called by application.switchWindow() when another window gets the focus.
        Overrides:
        onUnfocus in class TWindow
      • 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
      • onCommand

        public void onCommand​(TCommandEvent command)
        Method that subclasses can override to handle posted command events.
        Overrides:
        onCommand in class TWindow
        Parameters:
        command - command event
      • onMenu

        public void onMenu​(TMenuEvent menu)
        Handle posted menu events.
        Overrides:
        onMenu in class TWindow
        Parameters:
        menu - menu event