Class Grid.SelectionColumn

    • Method Detail

      • setDefaultHeaderContent

        protected void setDefaultHeaderContent​(Grid.HeaderCell selectionCell)
        Description copied from class: Grid.Column
        Resets the default header cell contents to column header captions.
        Overrides:
        setDefaultHeaderContent in class Grid.Column<Boolean,​T>
        Parameters:
        selectionCell - default header cell for this column
      • setWidth

        public Grid.Column<Boolean,​T> setWidth​(double pixels)
        Description copied from class: Grid.Column
        Sets the pixel width of the column. Use a negative value for the grid to autosize column based on content and available space.

        This action is done "finally", once the current execution loop returns. This is done to reduce overhead of unintentionally always recalculate all columns, when modifying several columns at once.

        If the column is currently hidden, then this set width has effect only once the column has been made visible again.

        Overrides:
        setWidth in class Grid.Column<Boolean,​T>
        Parameters:
        pixels - the width in pixels or negative for auto sizing
      • getValue

        public Boolean getValue​(T row)
        Description copied from class: Grid.Column
        Returns the data that should be rendered into the cell. By default returning Strings and Widgets are supported. If the return type is a String then it will be treated as preformatted text.

        To support other types you will need to pass a custom renderer to the column via the column constructor.

        Specified by:
        getValue in class Grid.Column<Boolean,​T>
        Parameters:
        row - The row object that provides the cell content.
        Returns:
        The cell content
      • setExpandRatio

        public Grid.Column<Boolean,​T> setExpandRatio​(int ratio)
        Description copied from class: Grid.Column
        Sets the ratio with which the column expands.

        By default, all columns expand equally (treated as if all of them had an expand ratio of 1). Once at least one column gets a defined expand ratio, the implicit expand ratio is removed, and only the defined expand ratios are taken into account.

        If a column has a defined width (Grid.Column.setWidth(double)), it overrides this method's effects.

        Example: A grid with three columns, with expand ratios 0, 1 and 2, respectively. The column with a ratio of 0 is exactly as wide as its contents requires. The column with a ratio of 1 is as wide as it needs, plus a third of any excess space, bceause we have 3 parts total, and this column reservs only one of those. The column with a ratio of 2, is as wide as it needs to be, plus two thirds of the excess width.

        This action is done "finally", once the current execution loop returns. This is done to reduce overhead of unintentionally always recalculate all columns, when modifying several columns at once.

        Overrides:
        setExpandRatio in class Grid.Column<Boolean,​T>
        Returns:
        this column
      • setMaximumWidth

        public Grid.Column<Boolean,​T> setMaximumWidth​(double pixels)
        Description copied from class: Grid.Column
        Sets the maximum width for this column.

        This defines the maximum allowed pixel width of the column when it is set to expand.

        This action is done "finally", once the current execution loop returns. This is done to reduce overhead of unintentionally always recalculate all columns, when modifying several columns at once.

        Overrides:
        setMaximumWidth in class Grid.Column<Boolean,​T>
        Parameters:
        pixels - the maximum width
        Returns:
        this column
      • setMinimumWidth

        public Grid.Column<Boolean,​T> setMinimumWidth​(double pixels)
        Description copied from class: Grid.Column
        Sets the minimum width for this column.

        This defines the minimum guaranteed pixel width of the column when it is set to expand.

        This action is done "finally", once the current execution loop returns. This is done to reduce overhead of unintentionally always recalculate all columns, when modifying several columns at once.

        Overrides:
        setMinimumWidth in class Grid.Column<Boolean,​T>
        Parameters:
        pixels - the minimum width
        Returns:
        this column
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets whether the selection column is enabled.
        Parameters:
        enabled - true to enable the column, false to disable it.
        Since:
        7.7
      • onEnabled

        public void onEnabled​(boolean enabled)
        Description copied from interface: GridEnabledHandler
        Called when Grid is enabled or disabled.
        Specified by:
        onEnabled in interface GridEnabledHandler
        Parameters:
        enabled - true if status changes from disabled to enabled, otherwise false.
      • setUserSelectionAllowed

        public void setUserSelectionAllowed​(boolean userSelectionAllowed)
        Sets whether the user is allowed to change the selection.
        Parameters:
        userSelectionAllowed - true if the user is allowed to change the selection, false otherwise
        Since:
        7.7.7
      • cleanup

        public void cleanup()