com.vaadin.ui
Interface Grid.SelectionModel.Multi

All Superinterfaces:
Grid.SelectionModel, java.io.Serializable
All Known Implementing Classes:
Grid.MultiSelectionModel
Enclosing interface:
Grid.SelectionModel

public static interface Grid.SelectionModel.Multi
extends Grid.SelectionModel

A SelectionModel that supports multiple selections to be made.

This interface has a contract of having the same behavior, no matter how the selection model is interacted with. In other words, if something is forbidden to do in e.g. the user interface, it must also be forbidden to do in the server-side and client-side APIs.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Grid.SelectionModel
Grid.SelectionModel.Multi, Grid.SelectionModel.None, Grid.SelectionModel.Single
 
Method Summary
 boolean deselect(java.util.Collection<?> itemIds)
          Marks items as deselected.
 boolean deselect(java.lang.Object... itemIds)
          Marks items as deselected.
 boolean deselectAll()
          Marks all the items in the current Container as deselected
 boolean select(java.util.Collection<?> itemIds)
          Marks items as selected.
 boolean select(java.lang.Object... itemIds)
          Marks items as selected.
 boolean selectAll()
          Marks all the items in the current Container as selected
 boolean setSelected(java.util.Collection<?> itemIds)
          Marks items as selected while deselecting all items not in the given Collection.
 boolean setSelected(java.lang.Object... itemIds)
          Marks items as selected while deselecting all items not in the varargs array.
 
Methods inherited from interface com.vaadin.ui.Grid.SelectionModel
getSelectedRows, isSelected, reset, setGrid
 

Method Detail

select

boolean select(java.lang.Object... itemIds)
               throws java.lang.IllegalArgumentException
Marks items as selected.

This method does not clear any previous selection state, only adds to it.

Parameters:
itemIds - the itemId(s) to mark as selected
Returns:
true if the selection state changed. false if all the given itemIds already were selected
Throws:
java.lang.IllegalArgumentException - if the itemIds varargs array is null or given itemIds don't exist in the container of Grid
See Also:
deselect(Object...)

select

boolean select(java.util.Collection<?> itemIds)
               throws java.lang.IllegalArgumentException
Marks items as selected.

This method does not clear any previous selection state, only adds to it.

Parameters:
itemIds - the itemIds to mark as selected
Returns:
true if the selection state changed. false if all the given itemIds already were selected
Throws:
java.lang.IllegalArgumentException - if itemIds is null or given itemIds don't exist in the container of Grid
See Also:
deselect(Collection)

deselect

boolean deselect(java.lang.Object... itemIds)
                 throws java.lang.IllegalArgumentException
Marks items as deselected.

Parameters:
itemIds - the itemId(s) to remove from being selected
Returns:
true if the selection state changed. false if none the given itemIds were selected previously
Throws:
java.lang.IllegalArgumentException - if the itemIds varargs array is null
See Also:
select(Object...)

deselect

boolean deselect(java.util.Collection<?> itemIds)
                 throws java.lang.IllegalArgumentException
Marks items as deselected.

Parameters:
itemIds - the itemId(s) to remove from being selected
Returns:
true if the selection state changed. false if none the given itemIds were selected previously
Throws:
java.lang.IllegalArgumentException - if itemIds is null
See Also:
select(Collection)

selectAll

boolean selectAll()
Marks all the items in the current Container as selected

Returns:
true iff some items were previously not selected
See Also:
deselectAll()

deselectAll

boolean deselectAll()
Marks all the items in the current Container as deselected

Returns:
true iff some items were previously selected
See Also:
selectAll()

setSelected

boolean setSelected(java.util.Collection<?> itemIds)
                    throws java.lang.IllegalArgumentException
Marks items as selected while deselecting all items not in the given Collection.

Parameters:
itemIds - the itemIds to mark as selected
Returns:
true if the selection state changed. false if all the given itemIds already were selected
Throws:
java.lang.IllegalArgumentException - if itemIds is null or given itemIds don't exist in the container of Grid

setSelected

boolean setSelected(java.lang.Object... itemIds)
                    throws java.lang.IllegalArgumentException
Marks items as selected while deselecting all items not in the varargs array.

Parameters:
itemIds - the itemIds to mark as selected
Returns:
true if the selection state changed. false if all the given itemIds already were selected
Throws:
java.lang.IllegalArgumentException - if the itemIds varargs array is null or given itemIds don't exist in the container of Grid


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.