Class Tree.TargetInSubtree

  • All Implemented Interfaces:
    AcceptCriterion, Serializable
    Enclosing class:
    Tree

    @Deprecated
    public class Tree.TargetInSubtree
    extends ClientSideCriterion
    Deprecated.
    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.

    See Also:
    Serialized Form
    • Constructor Detail

      • TargetInSubtree

        public TargetInSubtree​(Object parentItemId)
        Deprecated.
        Constructs a criteria that accepts the drag if the targeted Item is a descendant of Item identified by given id.
        Parameters:
        parentItemId - the item identifier of the parent node
      • TargetInSubtree

        public TargetInSubtree​(Object rootId,
                               int depthToCheck)
        Deprecated.
        Constructs a criteria that accepts drops within given level below the subtree root identified by given id.
        Parameters:
        rootId - the item identifier to be sought for
        depthToCheck - the depth that tree is traversed upwards to seek for the parent, -1 means that the whole structure should be checked