|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.event.dd.acceptcriteria.ClientSideCriterion
com.vaadin.ui.Tree.TargetInSubtree
public class Tree.TargetInSubtree
An accept criterion that checks the parent node (or parent hierarchy) for the item identifier given in constructor. If the parent is found, content is accepted. Criterion can be used to accepts drags on a specific sub tree only.
The root items is also consider to be valid target.
Constructor Summary | |
---|---|
Tree.TargetInSubtree(Object parentItemId)
Constructs a criteria that accepts the drag if the targeted Item is a descendant of Item identified by given id |
|
Tree.TargetInSubtree(Object rootId,
int depthToCheck)
Constructs a criteria that accepts drops within given level below the subtree root identified by given id. |
Method Summary | |
---|---|
boolean |
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for the DropHandler.drop(DragAndDropEvent) method. |
void |
paintContent(PaintTarget target)
|
Methods inherited from class com.vaadin.event.dd.acceptcriteria.ClientSideCriterion |
---|
getIdentifier, isClientSideVerifiable, paint, paintResponse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tree.TargetInSubtree(Object parentItemId)
parentItemId
- the item identifier of the parent nodepublic Tree.TargetInSubtree(Object rootId, int depthToCheck)
rootId
- the item identifier to be sought fordepthToCheck
- the depth that tree is traversed upwards to seek for the
parent, -1 means that the whole structure should be
checkedMethod Detail |
---|
public boolean accept(DragAndDropEvent dragEvent)
AcceptCriterion
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.
public void paintContent(PaintTarget target) throws PaintException
paintContent
in class ClientSideCriterion
PaintException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |