Class GridView<T>

    • Constructor Detail

    • Method Detail

      • getColumns

        public int getColumns()
        Returns:
        number of columns
      • setColumns

        public GridView<TsetColumns​(int cols)
        Sets number of columns
        Parameters:
        cols - number of columns
        Returns:
        this for chaining
      • getRows

        public int getRows()
        Returns:
        number of rows per page
      • setRows

        public GridView<TsetRows​(int rows)
        Sets number of rows per page
        Parameters:
        rows - number of rows
        Returns:
        this for chaining
      • addItems

        protected void addItems​(Iterator<Item<T>> items)
        Description copied from class: RefreshingView
        Add items to the view. Prior to this all items were removed so every request this function starts from a clean slate.
        Overrides:
        addItems in class RefreshingView<T>
        Parameters:
        items - item instances to be added to this view
      • populateEmptyItem

        protected abstract void populateEmptyItem​(Item<T> item)
        Add component to an Item for which there is no model anymore and is shown in a cell
        Parameters:
        item - Item object
      • newEmptyItem

        protected Item<TnewEmptyItem​(String id,
                                       int index)
        Create a Item which represents an empty cell (there is no model for it in the DataProvider)
        Parameters:
        id -
        index -
        Returns:
        created item
      • newRowItem

        protected Item<?> newRowItem​(String id,
                                     int index)
        Create a new Item which will hold a row.
        Parameters:
        id -
        index -
        Returns:
        created Item