com.alee.laf.tree
Class TreeRolloverSelectionAdapter

java.lang.Object
  extended by com.alee.laf.tree.TreeRolloverSelectionAdapter
All Implemented Interfaces:
java.awt.event.MouseMotionListener, java.util.EventListener

public class TreeRolloverSelectionAdapter
extends java.lang.Object
implements java.awt.event.MouseMotionListener

Custom mouse motion listener that provides select-on-rollover behavior for any JTree.

Author:
Mikle Garin

Constructor Summary
TreeRolloverSelectionAdapter(javax.swing.JTree tree)
          Constructs rollover selection adapter for the specified list.
 
Method Summary
static TreeRolloverSelectionAdapter install(javax.swing.JTree tree)
          Installs rollover selection adapter into list and ensures that it is the only one installed.
static boolean isInstalled(javax.swing.JTree tree)
          Returns whether the specified list has any rollover selection adapters installed or not.
 void mouseDragged(java.awt.event.MouseEvent e)
          Ignored mouse event.
 void mouseMoved(java.awt.event.MouseEvent e)
          Performs selection change on rollover.
static void uninstall(javax.swing.JTree tree)
          Uninstalls all rollover selection adapters from the specified list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeRolloverSelectionAdapter

public TreeRolloverSelectionAdapter(javax.swing.JTree tree)
Constructs rollover selection adapter for the specified list.

Parameters:
tree - list into which this adapter is installed
Method Detail

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Performs selection change on rollover.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
e - mouse event

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Ignored mouse event.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
e - mouse event

install

public static TreeRolloverSelectionAdapter install(javax.swing.JTree tree)
Installs rollover selection adapter into list and ensures that it is the only one installed.

Parameters:
tree - list to modify
Returns:
installed rollover selection adapter

uninstall

public static void uninstall(javax.swing.JTree tree)
Uninstalls all rollover selection adapters from the specified list.

Parameters:
tree - list to modify

isInstalled

public static boolean isInstalled(javax.swing.JTree tree)
Returns whether the specified list has any rollover selection adapters installed or not.

Parameters:
tree - list to process
Returns:
true if the specified list has any rollover selection adapters installed, false otherwise