Interface Tree.DropHandler<T>

Type Parameters:
T - the node type
Enclosing class:
Tree<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Tree.DropHandler<T>
Something was dropped on this tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drop(DropEvent event, @Nullable T parent, int index)
    Takes what was dropped: reads it from event.offer(), adds it to the data and calls Tree.refresh().
  • Method Details

    • drop

      void drop(DropEvent event, @Nullable T parent, int index)
      Takes what was dropped: reads it from event.offer(), adds it to the data and calls Tree.refresh(). event.action() says whether it is a copy or a move, and event.reject() refuses it after all.
      Parameters:
      event - the drop
      parent - the node it was dropped into, or null for the top level
      index - where among the children of parent: before the child now at that index, or after the last when it is their count