Package org.apache.pivot.wtk
Interface TreeViewBranchListener
-
- All Known Implementing Classes:
TerraTreeViewSkin
,TreeViewBranchListener.Adapter
,TreeViewBranchListener.Listeners
public interface TreeViewBranchListener
Tree view branch listener interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TreeViewBranchListener.Adapter
Deprecated.Since 2.1 and Java 8 the interface itself has default implementations.static class
TreeViewBranchListener.Listeners
Tree view branch listener list.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
branchCollapsed(TreeView treeView, Sequence.Tree.Path path)
Called when a tree node is collapsed.default void
branchExpanded(TreeView treeView, Sequence.Tree.Path path)
Called when a tree node is expanded.default void
branchExpandedChangeVetoed(TreeView treeView, Sequence.Tree.Path path, Vote reason)
Called when thepreviewBranchExpandedChange()
tally produces anything but aVote.APPROVE
result (to say NOT to expand or collapse the branch).default Vote
previewBranchExpandedChange(TreeView treeView, Sequence.Tree.Path path)
Called before a tree node is expanded or collapsed to allow the application or the skin to refuse the operation.
-
-
-
Method Detail
-
branchExpanded
default void branchExpanded(TreeView treeView, Sequence.Tree.Path path)
Called when a tree node is expanded. This event can be used to perform lazy loading of tree node data.- Parameters:
treeView
- The source of the event.path
- The path of the node that was shown.
-
branchCollapsed
default void branchCollapsed(TreeView treeView, Sequence.Tree.Path path)
Called when a tree node is collapsed.- Parameters:
treeView
- The source of the event.path
- The path of the node that was collapsed.
-
previewBranchExpandedChange
default Vote previewBranchExpandedChange(TreeView treeView, Sequence.Tree.Path path)
Called before a tree node is expanded or collapsed to allow the application or the skin to refuse the operation.- Parameters:
treeView
- The source of the event.path
- The path of the node about to be collapsed or expanded.- Returns:
- The accumulated vote as to whether to allow this expansion or collapse.
-
branchExpandedChangeVetoed
default void branchExpandedChangeVetoed(TreeView treeView, Sequence.Tree.Path path, Vote reason)
Called when thepreviewBranchExpandedChange()
tally produces anything but aVote.APPROVE
result (to say NOT to expand or collapse the branch). The application or skin can reverse any GUI changes that may have happened in the preview method.- Parameters:
treeView
- The source of the event.path
- The path of the node whose state will remain the same.reason
- The tallied vote result that caused the veto.
-
-