com.vaadin.client.widget.grid.selection.

Class AbstractRowHandleSelectionModel<T>

  • java.lang.Object
    • com.vaadin.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
  • Type Parameters:

    T - The grid's row type

    All Implemented Interfaces:

    SelectionModel<T>

    Direct Known Subclasses:

    SelectionModelMulti, SelectionModelNone, SelectionModelSingle

    public abstract class AbstractRowHandleSelectionModel<T>
    extends Object
    implements SelectionModel<T>

    An abstract class that adds a consistent API for common methods that's needed by Vaadin's server-based selection models to work.

    Note: This should be an interface instead of an abstract class, if only we could define protected methods in an interface.

    Since:

    7.4

    Author:

    Vaadin Ltd

    • Constructor Detail

      • AbstractRowHandleSelectionModel

        public AbstractRowHandleSelectionModel()
    • Method Detail

      • selectByHandle

        protected abstract boolean selectByHandle​(DataSource.RowHandle<T> handle)

        Select a row, based on its RowHandle.

        Note: this method may not fire selection change events.

        Parameters:

        handle - the handle to select by

        Returns:

        true iff the selection state was changed by this call

        Throws:

        UnsupportedOperationException - if the selection model does not support either handles or selection

      • deselectByHandle

        protected abstract boolean deselectByHandle​(DataSource.RowHandle<T> handle)
                                             throws UnsupportedOperationException

        Deselect a row, based on its RowHandle.

        Note: this method may not fire selection change events.

        Parameters:

        handle - the handle to deselect by

        Returns:

        true iff the selection state was changed by this call

        Throws:

        UnsupportedOperationException - if the selection model does not support either handles or deselection