This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The TreeTableView does not have drag & drop support like the other explorers. That seems inconsistent and unfortunate. If you don't have the resources to do it, I would appreciate it if you wrote down what you know about it (e.g. the steps involved, possibly an estimate of how much work it would be) in case I have a chance to work on it myself over the holidays. TreeTableView.java: /* DnD is not implemented for treeTable. */ public void setDragSource (boolean state) { } /* DnD is not implemented for treeTable. */ public void setDropTarget (boolean state) { }
I investigated it and i seemed as hard work. I didn't succeed to a attach gesture listener. Maybe the mouse listener eat mouse events. I will try it tomorrow again with a fresh mind :) In general: the DnD in the tree views is based on Cut&Paste actions. A dragSource and dropTarget is get from node.clipboardCut(), node.getPasteTypes. Other means of DnD sources isn't implemented yet. Is it sufficient for your purpose? For which sort of actions it should be used?
This is intended for reordering the task/suggestions list. If I want to make one task a subtask of another, or make one task appear higher in the list, I want to be able to drag it just like I can move files in the explorer. Thanks for working on it! I really appreciate it!
I didn't found any reason why it didn't work for me. I completely ended at a exception from native peer on linux with jdk1.4.1fcs (on windows it operates a little bit but I haven't win on my machine to play with). See at exception, maybe it helps you. I attach a hot patch which enables DnD in TTW, try it on your solaris if can. I am sorry I now couldn't help more I haven't any idea. Lots of luck to passed it. I'm ready to help when you'll solve the described problem. startDrag with: cursor: sun.awt.motif.X11CustomCursor[ACTION_MOVE] image: BufferedImage@666c7a: type = 0 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=1000000 IntegerInterleavedRaster: width = 32 height = 32 #Bands = 4 xOff = 0 yOff = 0 dataOffset[0] 0 point: java.awt.Point[x=16,y=16] transferable: org.openide.util.datatransfer.ExTransferable@113eb9c listener: org.openide.explorer.view.TreeViewDragSupport@d16d11 event: java.awt.dnd.DragGestureEvent[source=sun.awt.motif.MMouseDragGestureRecognizer@14f83d1] -- done INFORMATIONAL *********** Exception occurred ************ at Fri Nov 29 18:29:59 CET 2002 java.awt.dnd.InvalidDnDOperationException: failed to create native peer: java.lang.NullPointerException: null native data for trigger event at sun.awt.motif.MDragSourceContextPeer.startDrag(MDragSourceContextPeer.java:71) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:106) at java.awt.dnd.DragSource.startDrag(DragSource.java:305) at java.awt.dnd.DragSource.startDrag(DragSource.java:375) at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:245) [catch] at org.openide.explorer.view.ExplorerDragSupport.dragGestureRecognized(ExplorerDragSupport.java:125)
Created attachment 8115 [details] a patch for testing not for integration to trunk
On Solaris I get the same exceptions that you observed. I tried with both jdk1.4.1_01 and jdk1.4.2-b08 - same problem. I also ran on Windows, and drag & drop -sort- of worked; no exceptions, and the drag source node is deleted before I release the mouse button. I'm not sure if this is a bug in drag & drop, or more likely that we'll need to do something extra for TreeTables, since they're a composite component of a JTree and a JTable; perhaps this composition is tricking the drag & drop code. I looked at the source code for the last version of the TreeTable component in the Swing Connection: http://java.sun.com/products/jfc/tsc/articles/treetable2/ but there's no references to "drag" or "drop" in the source code. I unfortunately don't understand enough about drag & drop yet to make sense of this, so I'll have to get educated on it before I can make any progress with this.
Small correction - I noticed that on Solaris with 1.4.2-b08, and in SDI mode (this might have been the case in the other configurations too and I just didn't notice it) the source node is ALSO deleted, just like on Windows. So the only difference is that on Windows, there's no exception dump, and I get a little "drop rectangle" appearing which I don't see on Solaris.
Hi, Just a little comment to let people know I'm very interested in this feature. If that can help the person working on it, I'm 100% supporting you :) Yours truly, Nicolas.
Any progress with this issue?
No plans to integrate it into the trunk for 4.0 - given the fragility of TTV, I'm not much in favor of doing anything destabilizing to it at this point (post beta 2). Could easily be supported after the TTV rewrite. AFAIK, DND in a TTV is not a requirement for anything in NB 4.0. Sorry to be contrarian, but TTV is rather like a very tall castle made of dominoes - a tiny push and the whole thing collapses. Jirka, you have a better sense than I do of how stable this is. Comments?
Anything new on this issue? I would like to see this fixed for 4.2 ..
Posting a comment on this bug made by an user at bugs.sun.com: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4785413 Submitted On 14-JUN-2006 Any resolution on this? It's been open for couple of years, w/o a good workaround...
*** Issue 44575 has been marked as a duplicate of this issue. ***
Netbeans staff, can we set the target milestone of this issue to 6.0? It is a P2 RFE for years now and is now blocking a whole bunch of other P2 feature requests.
Posting a comment on this bug made by an user at bugs.sun.com: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4785413 Submitted On 25-MAR-2008 I was interested with this feature. Any progress ?
new ttv with drag'n'drop support is planned for netbeans 7.0
outline/outlineview in nb6.5 does support drag and drop - closing