Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3813
| From | "Thomas Kellerer" <thomas.kellerer@THRWHITE.remove-dii-this> |
|---|---|
| Subject | JTree, SelectionModel and |
| Message-ID | <6epi8kF86fnrU1@mid.individual.net> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:47 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Hi, I have a JTree where I allow multiple leafs to be selected and moved from their original parent node to another node. This is working fine - basically. The problem is with the SelectionModel: after I have selected e.g. 3 leafs, and then try to drag them to a different parent node, the first click that is required to start the drag will de-select all leafs except the one that I clicked on. When I hold down the Ctrl-Key while clicking everything is fine (drag & drop works without problems, it's the selection that is the problem) Now my question is: how do I configure the DefaultTreeSelectionModel to change the selection on the mouseReleased event not on the mouseClicked event? Basically I only want the selection to change when the user really clicked (pushed & released) the mouse button, not when pressing and keeping the button pressed Regards Thomas --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread
JTree, SelectionModel and "Thomas Kellerer" <thomas.kellerer@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
csiph-web