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:
- AcceptCriterion, java.io.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 |
TargetDetailIs(java.lang.String dataFlavor,
java.lang.Boolean true1)
|
TargetDetailIs(java.lang.String dataFlavor,
java.lang.String value)
Constructs a criterion which ensures that the value there is a value in
TargetDetails that equals the reference value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TargetDetailIs
public TargetDetailIs(java.lang.String dataFlavor,
java.lang.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
TargetDetailIs
public TargetDetailIs(java.lang.String dataFlavor,
java.lang.Boolean true1)
paintContent
public void paintContent(PaintTarget target)
throws PaintException
- Overrides:
paintContent
in class ClientSideCriterion
- Throws:
PaintException
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 java.lang.String getIdentifier()
- Overrides:
getIdentifier
in class ClientSideCriterion
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.