Class DefaultTableHeaderRenderer<V>

  • All Implemented Interfaces:
    TableHeaderRenderer<V>

    public class DefaultTableHeaderRenderer<V>
    extends java.lang.Object
    implements TableHeaderRenderer<V>
    Default implementation of TableHeaderRenderer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void drawHeader​(Table<V> table, java.lang.String label, int index, TextGUIGraphics textGUIGraphics)
      Called by the table when it's time to draw a header, you can see how much size is available by checking the size of the textGUIGraphics.
      TerminalSize getPreferredSize​(Table<V> table, java.lang.String label, int columnIndex)
      Called by the table when it wants to know how big a particular table header should be
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultTableHeaderRenderer

        public DefaultTableHeaderRenderer()
    • Method Detail

      • getPreferredSize

        public TerminalSize getPreferredSize​(Table<V> table,
                                             java.lang.String label,
                                             int columnIndex)
        Description copied from interface: TableHeaderRenderer
        Called by the table when it wants to know how big a particular table header should be
        Specified by:
        getPreferredSize in interface TableHeaderRenderer<V>
        Parameters:
        table - Table containing the header
        label - Label for this header
        columnIndex - Column index of the header
        Returns:
        Size this renderer would like the header to have
      • drawHeader

        public void drawHeader​(Table<V> table,
                               java.lang.String label,
                               int index,
                               TextGUIGraphics textGUIGraphics)
        Description copied from interface: TableHeaderRenderer
        Called by the table when it's time to draw a header, you can see how much size is available by checking the size of the textGUIGraphics. The top-left position of the graphics object is the top-left position of this header.
        Specified by:
        drawHeader in interface TableHeaderRenderer<V>
        Parameters:
        table - Table containing the header
        label - Label for this header
        index - Column index of the header
        textGUIGraphics - Graphics object to header with