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,
                            int width,
                            int height)
        Public constructor.
        Parameters:
        parent - the main application
        title - window title
        width - width of window
        height - height of window
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.lang.String title,
                            int width,
                            int height,
                            int flags)
        Public constructor.
        Parameters:
        parent - the main application
        title - window title, will be centered along the top border
        width - width of window
        height - height of window
        flags - bitmask of RESIZABLE, CENTERED, or MODAL
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.lang.String title,
                            int x,
                            int y,
                            int width,
                            int height)
        Public constructor.
        Parameters:
        parent - the main application
        title - window title, will be centered along the top border
        x - column relative to parent
        y - row relative to parent
        width - width of window
        height - height of window
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.lang.String title,
                            int x,
                            int y,
                            int width,
                            int height,
                            int flags)
        Public constructor.
        Parameters:
        parent - the main application
        title - window title
        x - column relative to parent
        y - row relative to parent
        width - width of window
        height - height of window
        flags - mask of RESIZABLE, CENTERED, or MODAL
      • 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
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.io.File csvFile,
                            int width,
                            int height)
                     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
        width - width of window
        height - height of window
        Throws:
        java.io.IOException - if a java.io operation throws
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.io.File csvFile,
                            int width,
                            int height,
                            int flags)
                     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
        width - width of window
        height - height of window
        flags - bitmask of RESIZABLE, CENTERED, or MODAL
        Throws:
        java.io.IOException - if a java.io operation throws
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.io.File csvFile,
                            int x,
                            int y,
                            int width,
                            int height)
                     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
        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
      • TTableWindow

        public TTableWindow​(TApplication parent,
                            java.io.File csvFile,
                            int x,
                            int y,
                            int width,
                            int height,
                            int flags)
                     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
        x - column relative to parent
        y - row relative to parent
        width - width of window
        height - height of window
        flags - mask of RESIZABLE, CENTERED, or MODAL
        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
      • getTableWidget

        public TTableWidget getTableWidget()
        Retrieve the underlying TTableWidget.
        Returns:
        the table widget