File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Similar Threads
JTree Selection Customization
component communication
Drag and Drop problem
Applet - Drag and Drop
making own InputStreamReader()