Package com.vaadin.ui
Class AbstractSelect.AcceptItem
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
-
- com.vaadin.ui.AbstractSelect.AcceptItem
-
- All Implemented Interfaces:
AcceptCriterion
,Serializable
- Enclosing class:
- AbstractSelect
public static class AbstractSelect.AcceptItem extends ClientSideCriterion
This criterion accepts a only aTransferable
that contains given Item (practically its identifier) from a specific AbstractSelect.- Since:
- 6.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ClientSideCriterion
ALL
A simple accept criterion which ensures thatTransferable
contains anItem
(or actually its identifier).
-
Constructor Summary
Constructors Constructor Description AcceptItem(AbstractSelect select, Object... itemId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for theDropHandler.drop(DragAndDropEvent)
method.-
Methods inherited from class com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
getIdentifier, isClientSideVerifiable, paint, paintResponse
-
-
-
-
Field Detail
-
ALL
public static final ClientSideCriterion ALL
A simple accept criterion which ensures thatTransferable
contains anItem
(or actually its identifier). In other words the criterion check that drag is coming from aContainer
likeTree
orTable
.
-
-
Constructor Detail
-
AcceptItem
public AcceptItem(AbstractSelect select, Object... itemId)
- Parameters:
select
- the select from which the item id's are checkeditemId
- the item identifier(s) of the select that are accepted
-
-
Method Detail
-
accept
public boolean accept(DragAndDropEvent dragEvent)
Description copied from interface:AcceptCriterion
Validates the data in event to be appropriate for theDropHandler.drop(DragAndDropEvent)
method.Note that even if your criterion is validated on client side, you should always validate the data on server side too.
- Returns:
-
-