com.vaadin.event.dd.acceptcriteria.
Class TargetDetailIs
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
-
- com.vaadin.event.dd.acceptcriteria.TargetDetailIs
-
All Implemented Interfaces:
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:
-
-
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 in
TargetDetails
that equals the reference value.
-
Method Summary
All Methods Modifier and Type Method Description boolean
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for the
DropHandler.drop(DragAndDropEvent)
method.protected String
getIdentifier()
void
paintContent(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 in
TargetDetails
that 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:
paintContent
in classClientSideCriterion
Throws:
-
accept
public boolean accept(DragAndDropEvent dragEvent)
Description copied from interface:
AcceptCriterion
Validates the data in event to be appropriate for the
DropHandler.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:
getIdentifier
in classClientSideCriterion
-
-