|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.ui.Grid.AbstractGridExtension
com.vaadin.ui.Grid.AbstractSelectionModel
com.vaadin.ui.Grid.MultiSelectionModel
public static class Grid.MultiSelectionModel
A default implementation of a Grid.SelectionModel.Multi
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.ui.Grid.SelectionModel |
|---|
Grid.SelectionModel.Multi, Grid.SelectionModel.None, Grid.SelectionModel.Single |
| Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
|---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_SELECTIONS
The default selection size limit. |
| Fields inherited from class com.vaadin.ui.Grid.AbstractSelectionModel |
|---|
selection |
| Constructor Summary | |
|---|---|
Grid.MultiSelectionModel()
|
|
| Method Summary | |
|---|---|
boolean |
deselect(java.util.Collection<?> itemIds)
Marks items as deselected. |
protected boolean |
deselect(java.util.Collection<?> itemIds,
boolean refresh)
|
boolean |
deselect(java.lang.Object... itemIds)
Marks items as deselected. |
boolean |
deselectAll()
Marks all the items in the current Container as deselected |
protected boolean |
deselectAll(boolean refresh)
|
protected void |
extend(AbstractClientConnector target)
Add this extension to the target connector. |
java.util.Collection<java.lang.Object> |
getSelectedRows()
Returns a collection of all the currently selected itemIds. |
int |
getSelectionLimit()
Gets the selection limit. |
protected com.vaadin.shared.ui.grid.selection.MultiSelectionModelState |
getState()
Returns the shared state for this connector. |
void |
reset()
Resets the selection model. |
boolean |
select(java.util.Collection<?> itemIds)
Marks items as selected. |
protected boolean |
select(java.util.Collection<?> itemIds,
boolean refresh)
|
boolean |
select(java.lang.Object... itemIds)
Marks items as selected. |
boolean |
selectAll()
Marks all the items in the current Container as selected |
protected boolean |
selectAll(boolean refresh)
|
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. |
void |
setSelectionLimit(int selectionLimit)
Sets the maximum number of rows that can be selected at once. |
| Methods inherited from class com.vaadin.ui.Grid.AbstractSelectionModel |
|---|
checkItemIdExists, checkItemIdsExist, destroyData, fireSelectionEvent, generateData, getItemId, isSelected, setGrid |
| Methods inherited from class com.vaadin.ui.Grid.AbstractGridExtension |
|---|
addComponentToGrid, getColumn, getParentGrid, refreshRow, remove, removeComponentFromGrid |
| Methods inherited from class com.vaadin.server.AbstractExtension |
|---|
getParent, getSupportedParentType, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.ui.Grid.SelectionModel |
|---|
isSelected, setGrid |
| Methods inherited from interface com.vaadin.server.Extension |
|---|
remove, setParent |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Field Detail |
|---|
public static final int DEFAULT_MAX_SELECTIONS
setSelectionLimit(int),
Constant Field Values| Constructor Detail |
|---|
public Grid.MultiSelectionModel()
| Method Detail |
|---|
protected void extend(AbstractClientConnector target)
AbstractExtension
extend in class Grid.AbstractGridExtensiontarget - the connector to attach this extension to
public boolean select(java.lang.Object... itemIds)
throws java.lang.IllegalArgumentException
Grid.SelectionModel.MultiThis method does not clear any previous selection state, only adds to it.
select in interface Grid.SelectionModel.MultiitemIds - the itemId(s) to mark as selected
true if the selection state changed.
false if all the given itemIds already were
selected
java.lang.IllegalArgumentException - if the itemIds varargs array is
null or given itemIds don't exist in the
container of GridGrid.SelectionModel.Multi.deselect(Object...)
public boolean select(java.util.Collection<?> itemIds)
throws java.lang.IllegalArgumentException
This method does not clear any previous selection state, only adds to it.
All items might not be selected if the limit set using
setSelectionLimit(int) is exceeded.
select in interface Grid.SelectionModel.MultiitemIds - the itemIds to mark as selected
true if the selection state changed.
false if all the given itemIds already were
selected
java.lang.IllegalArgumentException - if itemIds is null or given
itemIds don't exist in the container of GridGrid.SelectionModel.Multi.deselect(Collection)
protected boolean select(java.util.Collection<?> itemIds,
boolean refresh)
public void setSelectionLimit(int selectionLimit)
Old selections are not discarded if the current number of selected row exceeds the new limit.
The default limit is 1000 rows.
selectionLimit - the non-negative selection limit to set
java.lang.IllegalArgumentException - if the limit is negativepublic int getSelectionLimit()
setSelectionLimit(int)
public boolean deselect(java.lang.Object... itemIds)
throws java.lang.IllegalArgumentException
Grid.SelectionModel.Multi
deselect in interface Grid.SelectionModel.MultiitemIds - the itemId(s) to remove from being selected
true if the selection state changed.
false if none the given itemIds were
selected previously
java.lang.IllegalArgumentException - if the itemIds varargs array is
nullGrid.SelectionModel.Multi.select(Object...)
public boolean deselect(java.util.Collection<?> itemIds)
throws java.lang.IllegalArgumentException
Grid.SelectionModel.Multi
deselect in interface Grid.SelectionModel.MultiitemIds - the itemId(s) to remove from being selected
true if the selection state changed.
false if none the given itemIds were
selected previously
java.lang.IllegalArgumentException - if itemIds is nullGrid.SelectionModel.Multi.select(Collection)
protected boolean deselect(java.util.Collection<?> itemIds,
boolean refresh)
public boolean selectAll()
Grid.SelectionModel.Multi
selectAll in interface Grid.SelectionModel.Multitrue iff some items were previously not
selectedGrid.SelectionModel.Multi.deselectAll()protected boolean selectAll(boolean refresh)
public boolean deselectAll()
Grid.SelectionModel.Multi
deselectAll in interface Grid.SelectionModel.Multitrue iff some items were previously selectedGrid.SelectionModel.Multi.selectAll()protected boolean deselectAll(boolean refresh)
public java.util.Collection<java.lang.Object> getSelectedRows()
The returned Collection is in order of selection – the item that was first selected will be first in the collection, and so on. Should an item have been selected twice without being deselected in between, it will have remained in its original position.
getSelectedRows in interface Grid.SelectionModelgetSelectedRows in class Grid.AbstractSelectionModelpublic void reset()
Equivalent to calling deselectAll()
reset in interface Grid.SelectionModel
public boolean setSelected(java.util.Collection<?> itemIds)
throws java.lang.IllegalArgumentException
Grid.SelectionModel.Multi
setSelected in interface Grid.SelectionModel.MultiitemIds - the itemIds to mark as selected
true if the selection state changed.
false if all the given itemIds already were
selected
java.lang.IllegalArgumentException - if itemIds is null or given
itemIds don't exist in the container of Grid
public boolean setSelected(java.lang.Object... itemIds)
throws java.lang.IllegalArgumentException
Grid.SelectionModel.Multi
setSelected in interface Grid.SelectionModel.MultiitemIds - the itemIds to mark as selected
true if the selection state changed.
false if all the given itemIds already were
selected
java.lang.IllegalArgumentException - if the itemIds varargs array is
null or given itemIds don't exist in the
container of Gridprotected com.vaadin.shared.ui.grid.selection.MultiSelectionModelState getState()
AbstractClientConnector
As a side effect, marks the connector dirty so any changes done to the
state will be sent to the client. Use getState(false) to avoid
marking the connector as dirty.
getState in class AbstractClientConnector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||