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:
Direct Known Subclasses:
AbstractSelect.VerticalLocationIs, Tree.TargetItemAllowsChildren
- extends ClientSideCriterion
public class TargetDetailIs
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 | |
---|---|
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 | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
TargetDetailIs
public TargetDetailIs(String dataFlavor,
String value)
- Parameters:
dataFlavor
- the type of data to be checkedvalue
- the reference value to which the drop target detail will be compared
Constructs a criterion which ensures that the value there is a value in
TargetDetails
that equals the reference value.
TargetDetailIs
public TargetDetailIs(String dataFlavor,
Boolean true1)
Method Detail |
---|
paintContent
public void paintContent(PaintTarget target)
throws PaintException
- Overrides:
paintContent
in classClientSideCriterion
- Throws:
PaintException
accept
public boolean accept(DragAndDropEvent dragEvent)
- Returns:
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.
getIdentifier
protected String getIdentifier()
- Overrides:
getIdentifier
in classClientSideCriterion