Package org.eclipse.swt.events
Class TreeAdapter
- java.lang.Object
-
- org.eclipse.swt.events.TreeAdapter
-
- All Implemented Interfaces:
EventListener,TreeListener,SWTEventListener
public abstract class TreeAdapter extends Object implements TreeListener
This adapter class provides default implementations for the methods described by theTreeListenerinterface.Classes that wish to deal with
TreeEvents can extend this class and override only the methods which they are interested in.An alternative to this class are the static helper methods
TreeListener.treeCollapsedAdapter(java.util.function.Consumer)andTreeListener.treeExpandedAdapter(java.util.function.Consumer), which accept a lambda expression or a method reference that implements the event consumer.- See Also:
TreeListener,TreeEvent, Sample code and further information
-
-
Constructor Summary
Constructors Constructor Description TreeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtreeCollapsed(TreeEvent e)Sent when a tree branch is collapsed.voidtreeExpanded(TreeEvent e)Sent when a tree branch is expanded.
-
-
-
Method Detail
-
treeCollapsed
public void treeCollapsed(TreeEvent e)
Sent when a tree branch is collapsed. The default behavior is to do nothing.- Specified by:
treeCollapsedin interfaceTreeListener- Parameters:
e- an event containing information about the tree operation
-
treeExpanded
public void treeExpanded(TreeEvent e)
Sent when a tree branch is expanded. The default behavior is to do nothing.- Specified by:
treeExpandedin interfaceTreeListener- Parameters:
e- an event containing information about the tree operation
-
-