Class Table.Factory

  • Enclosing class:
    Table

    public static final class Table.Factory
    extends java.lang.Object
    Factory for creating new Table objects.
    • Method Detail

      • columnOne

        public Table.Factory columnOne​(java.lang.String columnName,
                                       Icon icon)
        Set first column name and icon.
        Parameters:
        columnName - Name of the column.
        icon - Icon of the column, color is ignored.
        Returns:
        Factory.
      • columnTwo

        public Table.Factory columnTwo​(java.lang.String columnName,
                                       Icon icon)
        Set second column name and icon.
        Parameters:
        columnName - Name of the column.
        icon - Icon of the column, color is ignored.
        Returns:
        Factory.
      • columnThree

        public Table.Factory columnThree​(java.lang.String columnName,
                                         Icon icon)
        Set third column name and icon.
        Parameters:
        columnName - Name of the column.
        icon - Icon of the column, color is ignored.
        Returns:
        Factory.
      • columnFour

        public Table.Factory columnFour​(java.lang.String columnName,
                                        Icon icon)
        Set fourth column name and icon.
        Parameters:
        columnName - Name of the column.
        icon - Icon of the column, color is ignored.
        Returns:
        Factory.
      • columnFive

        public Table.Factory columnFive​(java.lang.String columnName,
                                        Icon icon)
        Set fifth column name and icon.
        Parameters:
        columnName - Name of the column.
        icon - Icon of the column, color is ignored.
        Returns:
        Factory.
      • addRow

        public Table.Factory addRow​(java.lang.Object... values)
        Add a row of values to the table.
        Parameters:
        values - One value per column you have defined, Object#toString() will be called on the objects.
        Returns:
        Factory.
        Throws:
        java.lang.IllegalArgumentException - If given varargs for 'values' is null.
      • build

        public Table build()
        Finish building the table.
        Returns:
        Finished Table object.