Class TargetDetailIs
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
-
- com.vaadin.event.dd.acceptcriteria.TargetDetailIs
-
- All Implemented Interfaces:
AcceptCriterion,Serializable
- Direct Known Subclasses:
AbstractSelect.VerticalLocationIs,Tree.TargetItemAllowsChildren
public class TargetDetailIs extends ClientSideCriterion
Criterion for checking if drop target details contains the specific property with the specific value. Currently only String values are supported.- Since:
- 6.3 TODO add support for other basic data types that we support in UIDL.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TargetDetailIs(String dataFlavor, Boolean true1)TargetDetailIs(String dataFlavor, String value)Constructs a criterion which ensures that the value there is a value inTargetDetailsthat equals the reference value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(DragAndDropEvent dragEvent)Validates the data in event to be appropriate for theDropHandler.drop(DragAndDropEvent)method.protected StringgetIdentifier()voidpaintContent(PaintTarget target)-
Methods inherited from class com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
isClientSideVerifiable, paint, paintResponse
-
-
-
-
Constructor Detail
-
TargetDetailIs
public TargetDetailIs(String dataFlavor, String value)
Constructs a criterion which ensures that the value there is a value inTargetDetailsthat equals the reference value.- Parameters:
dataFlavor- the type of data to be checkedvalue- the reference value to which the drop target detail will be compared
-
-
Method Detail
-
paintContent
public void paintContent(PaintTarget target) throws PaintException
- Overrides:
paintContentin classClientSideCriterion- Throws:
PaintException
-
accept
public boolean accept(DragAndDropEvent dragEvent)
Description copied from interface:AcceptCriterionValidates 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:
-
getIdentifier
protected String getIdentifier()
- Overrides:
getIdentifierin classClientSideCriterion
-
-