JIDE 3.5.15

com.jidesoft.swing
Class CheckBoxTree.Handler

java.lang.Object
  extended by 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
protected  CheckBoxTree _tree
           
 
Constructor Summary
CheckBoxTree.Handler(CheckBoxTree tree)
          The constructor.
 
Method Summary
protected  boolean clicksInCheckBox(MouseEvent e, TreePath path)
          Checks if the mouse event happens for the tree path.
protected  TreePath getTreePathForMouseEvent(MouseEvent e)
          Gets the tree path according to the mouse event.
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
protected  void toggleSelections()
          Toggles the selected paths' selection state.
 void valueChanged(TreeSelectionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tree

protected CheckBoxTree _tree
Constructor Detail

CheckBoxTree.Handler

public CheckBoxTree.Handler(CheckBoxTree tree)
The constructor.

Parameters:
tree - the CheckBoxTree
Method Detail

getTreePathForMouseEvent

protected TreePath getTreePathForMouseEvent(MouseEvent e)
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

protected boolean clicksInCheckBox(MouseEvent e,
                                   TreePath path)
Checks if the mouse event happens for the tree path.

Parameters:
e - the mouse event
path - the tree path
Returns:
true if the mouse event need change the state of the tree node. Otherwise false.

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

valueChanged

public void valueChanged(TreeSelectionEvent e)
Specified by:
valueChanged in interface TreeSelectionListener

toggleSelections

protected void toggleSelections()
Toggles the selected paths' selection state.


JIDE 3.5.15