Class Board

    • Constructor Detail

      • Board

        public Board()
        Creates an empty board.

        Use addRow(Component...) to add content to the board.

    • Method Detail

      • addRow

        public Row addRow​(Component... components)
        Creates a new row and adds the given components to the row.

        All the added components have cols set to 1, i.e. use one slot in the row. The number of slots in the row is the number of added components.

        Parameters:
        components - components to add, no more than 4
        Returns:
        a row instance which can be used for further configuration
        Throws:
        IllegalArgumentException - if there are more than 4 components
      • removeRow

        public void removeRow​(Row row)
        Removes the given row from the board.
        Parameters:
        row - the row to be removed
      • redraw

        public void redraw()
        Forces the board to be redrawn.

        This method typically only needs to be called if you change CSS (through a variable or otherwise) which affects the size of the board or the breakpoints used. Otherwise, the component will be redrawn automatically when needed.