Module md.grammar

Interface TableColumn


  • public interface TableColumn
    Mutable attributes of a table column Attributes are mutable because a function that composes a table needs to be adjust spacing, etc. for best presentation.
    Author:
    Don Mendelson
    • Method Detail

      • getHeading

        String getHeading()
        Displayed table heading
        Returns:
        displayable string
      • getKey

        String getKey()
        Data key for values displayed in this column
        Returns:
        data key
      • getWidth

        int getWidth()
        Width of the column
        Returns:
        the column width
      • setHeading

        void setHeading​(String display)
        Set the heading to display, may be different than key
        Parameters:
        display - text to display
      • updateDatatype

        void updateDatatype​(Class<?> datatype)
        Update the inferred datatype of this column
        Parameters:
        datatype - a datatype to control formatting of data in the column
      • updateWidth

        int updateWidth​(int newWidth)
        Update width allowed for column
        Parameters:
        newWidth - minimum space requested for this column
        Returns:
        actual space allocated so far, may be larger than newWidth