Class SingleSelectionModelConnector.SingleSelectionModel

    • Constructor Detail

      • SingleSelectionModel

        public SingleSelectionModel()
    • Method Detail

      • getSelectionColumnRenderer

        public Renderer<Boolean> getSelectionColumnRenderer()
        Description copied from interface: SelectionModel
        Return the Renderer responsible for rendering the selection column.
        Specified by:
        getSelectionColumnRenderer in interface SelectionModel<elemental.json.JsonObject>
        Returns:
        a renderer instance. If null is returned, a selection column will not be drawn.
      • select

        public boolean select​(elemental.json.JsonObject row)
        Description copied from interface: SelectionModel.Single
        Selects a row.
        Specified by:
        select in interface SelectionModel.Single<elemental.json.JsonObject>
        Parameters:
        row - a Grid row object
        Returns:
        true, if this row as not previously selected.
      • deselect

        public boolean deselect​(elemental.json.JsonObject row)
        Description copied from interface: SelectionModel.Single
        Deselects a row.

        This is a no-op unless row is the currently selected row.

        Specified by:
        deselect in interface SelectionModel.Single<elemental.json.JsonObject>
        Parameters:
        row - a Grid row object
        Returns:
        true, if the currently selected row was deselected.
      • getSelectedRow

        public elemental.json.JsonObject getSelectedRow()
        Description copied from interface: SelectionModel.Single
        Returns the currently selected row.
        Specified by:
        getSelectedRow in interface SelectionModel.Single<elemental.json.JsonObject>
        Returns:
        a Grid row object or null, if nothing is selected.
      • setDeselectAllowed

        public void setDeselectAllowed​(boolean deselectAllowed)
        Description copied from interface: SelectionModel.Single
        Sets whether it's allowed to deselect the selected row through the UI. Deselection is allowed by default.
        Specified by:
        setDeselectAllowed in interface SelectionModel.Single<elemental.json.JsonObject>
        Parameters:
        deselectAllowed - true if the selected row can be deselected without selecting another row instead; otherwise false.
      • isDeselectAllowed

        public boolean isDeselectAllowed()
        Description copied from interface: SelectionModel.Single
        Sets whether it's allowed to deselect the selected row through the UI.
        Specified by:
        isDeselectAllowed in interface SelectionModel.Single<elemental.json.JsonObject>
        Returns:
        true if deselection is allowed; otherwise false
      • isUserSelectionAllowed

        public boolean isUserSelectionAllowed()
        Description copied from interface: HasUserSelectionAllowed
        Checks if the user is allowed to change the selection.
        Specified by:
        isUserSelectionAllowed in interface HasUserSelectionAllowed<elemental.json.JsonObject>
        Returns:
        true if the user is allowed to change the selection, false otherwise
      • setUserSelectionAllowed

        public void setUserSelectionAllowed​(boolean userSelectionAllowed)
        Description copied from interface: HasUserSelectionAllowed
        Sets whether the user is allowed to change the selection.
        Specified by:
        setUserSelectionAllowed in interface HasUserSelectionAllowed<elemental.json.JsonObject>
        Parameters:
        userSelectionAllowed - true if the user is allowed to change the selection, false otherwise