aspose file tools
The moose likes Swing / AWT / SWT / JFace and the fly likes TreeSelectionHandler and mouseovers Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "TreeSelectionHandler and mouseovers" Watch "TreeSelectionHandler and mouseovers" New topic
Author

TreeSelectionHandler and mouseovers

Thomas Todaro
Greenhorn

Joined: Feb 02, 2012
Posts: 3
TreeSelectionHandler's valueChanged event is being fired whenever I move the mouse over a node. That's a problem. I have some drag-and-drop logic, and when I drag something from a higher node to a lower node, the event is being fired whenever I pass over the in-between nodes on the way to the final drop location. My program has some code for validating the drop location, but I don't want that code to run simply because I moused over a node.

I thought about writing my own MouseListener, but there's no guarantee that MouseEvent will be fired before TreeSelectionEvent.

How do I get TreeSelectionHandler to respond to an actual mouse click, rather than the "mouse entered" event?
 
jQuery in Action, 2nd edition
 
subject: TreeSelectionHandler and mouseovers
 
Threads others viewed
Applet - Drag and Drop
making own InputStreamReader()
component communication
Drag and Drop problem
JTree Selection Customization
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com