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 boolean
clicksInCheckBox
(MouseEvent e, TreePath path) Checks if the mouse event happens for the tree path.protected TreePath
Gets the tree path according to the mouse event.void
void
void
void
void
void
void
void
protected void
Toggles 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:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
valueChanged
- Specified by:
valueChanged
in interfaceTreeSelectionListener
-
toggleSelections
protected void toggleSelections()Toggles the selected paths' selection state.
-