Interface TableRenderer<V>

    • Method Detail

      • drawComponent

        void drawComponent​(TextGUIGraphics graphics,
                           Table<V> component)
        Description copied from interface: ComponentRenderer
        Using the supplied graphics object, draws the component passed in.
        Specified by:
        drawComponent in interface ComponentRenderer<V>
        Parameters:
        graphics - Graphics object to use for drawing
        component - Component to draw
      • getPreferredSize

        TerminalSize getPreferredSize​(Table<V> component)
        Description copied from interface: ComponentRenderer
        Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.
        Specified by:
        getPreferredSize in interface ComponentRenderer<V>
        Parameters:
        component - Component to calculate the preferred size of
        Returns:
        The size this renderer would like the component to take up
      • isScrollBarsHidden

        boolean isScrollBarsHidden()
      • setScrollBarsHidden

        void setScrollBarsHidden​(boolean scrollBarsHidden)
      • getVisibleRowsOnLastDraw

        int getVisibleRowsOnLastDraw()
        Returns the number of rows visible in the table cell area on the last draw operation
        Returns:
        The number of rows visible in the table cell area on the last draw operation
      • getViewTopRow

        int getViewTopRow()
        Returns the index of the first visible row with the renderers current state
        Returns:
        Index of the first visible row of the table
      • setViewTopRow

        void setViewTopRow​(int viewTopRow)
        Modifies which row is the first visible, this may be overwritten depending on the circumstances when drawing the table.
        Parameters:
        viewTopRow - First row to be displayed when drawing the table
      • getViewLeftColumn

        int getViewLeftColumn()
        Returns the index of the first visible column with the renderers current state
        Returns:
        Index of the first visible column of the table
      • setViewLeftColumn

        void setViewLeftColumn​(int viewLeftColumn)
        Modifies which column is the first visible, this may be overwritten depending on the circumstances when drawing the table.
        Parameters:
        viewLeftColumn - First column to be displayed when drawing the table
      • setAllowPartialColumn

        void setAllowPartialColumn​(boolean allowPartialColumn)
        Parameters:
        allowPartialColumn - when not all columns fit on the screen, whether to render part of a column, or skip rendering that column entirely