Package com.vaadin.ui
Class AbstractSelect.TargetItemIs
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
-
- com.vaadin.ui.AbstractSelect.TargetItemIs
-
- All Implemented Interfaces:
AcceptCriterion
,Serializable
- Enclosing class:
- AbstractSelect
public static class AbstractSelect.TargetItemIs extends ClientSideCriterion
Criterion which accepts a drop only if the drop target is (one of) the given Item identifier(s). Criterion can be used only on a drop targets that extends AbstractSelect likeTable
andTree
. The target and identifiers of valid Items are given in constructor.- Since:
- 6.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TargetItemIs(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
-
-
-
-
Constructor Detail
-
TargetItemIs
public TargetItemIs(AbstractSelect select, Object... itemId)
- Parameters:
select
- the select implementation that is used as a drop targetitemId
- the identifier(s) that are valid drop locations
-
-
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:
-
-