Drag and Drop in TreeTableView
"Buch-Andersen Nicolai" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <8261989C18674A4D80792858B8AB3D95189F5F@WMRI000167.corp.wmdata.net> |
Hi
We are currently building a prototype application in order to evaluate
the NetBeans 4.0 Platform for use in a large project.
During this effort we ran into the following problem: There's no support
for reordering nodes using drag and drop in a TreeTableView (as opposed
to a BeanTreeView). The platform code for TreeTableView (package
org.openide.explorer.view) has the following lines:
/* DnD is not implemented for treeTable.
*/
public void setDragSource (boolean state) {
}
/* DnD is not implemented for treeTable.
*/
public void setDropTarget (boolean state) {
}
I tried naively to replace this with:
/* DnD is not implemented for treeTable - fixed
*/
public void setDragSource (boolean state) {
super.setDragSource(state);
}
/* DnD is not implemented for treeTable - fixed
*/
public void setDropTarget (boolean state) {
super.setDropTarget(state);
}
But that didn't solve the problem. Apparently there's more to it than
that.
* Does anyone know why DnD was disabled (or not implemented) in
TreeTableView in the first place?
* Can anyone outline what would be required to add support for DnD in a
TreeTableView?
Thanks!
Regards
Nicolai Buch-Andersen,
[email protected]