Re: Allow dropping files into an OutlineView

[email protected]
Newsgroups gmane.comp.java.ide.netbeans.user
Message-ID <[email protected]>
Thanks, that looks good.

Regards
Thomas


Am 13.03.25 um 20:01 schrieb Eirik Bakke:
> Drag and drop in OutlineView works as if pasting the item while the Node is selected.
> 
> To allow dropping onto a Node in an OutlineView, override the createPasteTypes method in the Node implementation. Then add relevant PasteType instances to retPasteTypes.
> 
> When dropping to areas outside any displayed Node, I believe the root node is used.
> 
> -- Eirik
> 
> *From: *"[email protected]" <[email protected]>
> *Date: *Wednesday, March 12, 2025 at 5:11 PM
> *To: *NetBeans Mailing List <[email protected]>
> *Subject: *Allow dropping files into an OutlineView
> 
> Hello,
> 
> I have a NetBeans platform application which uses an OutlineView.
> 
> It is populated by loading files with a specific format for the application. Currently Drag & Drop is enabled to re-order nodes.
> 
> I would like to also support dropping files into that OutlineView from the system's file explorer (e.g. Dolphin on KDE)
> 
> But I can't find a way to tell the outlineview to accept such a drag, and even if I could, I don't know how to react to the drop event.
> 
> OutlineView uses OutlineViewDropSupport to handle all drag related actions. But that class is final, so I can not extend it.
> 
> Any suggestions?
> 
> I am using NetBeans 24.
> 
> Thanks
> 
> Thomas
> 
> ---------------------------------------------------------------------
> 
> To unsubscribe, e-mail: [email protected] <mailto:[email protected]>
> 
> For additional commands, e-mail: [email protected] <mailto:[email protected]>
> 
> For further information about the NetBeans mailing lists, visit:
> 
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.