Package com.jidesoft.swing
Class CheckBoxTree.Handler
java.lang.Object
com.jidesoft.swing.CheckBoxTree.Handler
- All Implemented Interfaces:
KeyListener,MouseListener,EventListener,TreeSelectionListener
- Enclosing class:
CheckBoxTree
protected static class CheckBoxTree.Handler
extends Object
implements MouseListener, KeyListener, TreeSelectionListener
CheckBoxTree's mouse event handler, key event handler and tree selection event handler.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanclicksInCheckBox(MouseEvent e, TreePath path) Checks if the mouse event happens for the tree path.protected TreePathGets the tree path according to the mouse event.voidvoidvoidvoidvoidvoidvoidvoidprotected voidToggles the selected paths' selection state.void
-
Field Details
-
_tree
-
-
Constructor Details
-
Handler
The constructor.- Parameters:
tree- the CheckBoxTree
-
-
Method Details
-
getTreePathForMouseEvent
Gets the tree path according to the mouse event.- Parameters:
e- the mouse event- Returns:
- the tree path the mouse is over. null if no tree node is under the mouse position.
-
clicksInCheckBox
Checks if the mouse event happens for the tree path.- Parameters:
e- the mouse eventpath- the tree path- Returns:
- true if the mouse event need change the state of the tree node. Otherwise false.
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
valueChanged
- Specified by:
valueChangedin interfaceTreeSelectionListener
-
toggleSelections
protected void toggleSelections()Toggles the selected paths' selection state.
-