Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Swing / AWT / SWT and the fly likes TreeSelectionHandler and mouseovers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TreeSelectionHandler and mouseovers