简体   繁体   English

如何在编辑器中拖动和打开文件?

[英]How to drag and open file in editor?

I have a editor developed which opens the xml file and display it there (with the proper structure), for this I need to browse through all the times to select target file, in what way I can add dragging in file feature enable for this ? 我开发了一个编辑器,该编辑器打开xml文件并在其中显示(具有正确的结构),为此,我需要一直浏览以选择目标文件,以何种方式可以为此添加拖动文件功能?

The report editor is developed with Java SWT components. 报表编辑器是使用Java SWT组件开发的。

I want to know the possible ways or API available for "dragging in" file ? 我想知道“拖入”文件的可能方法或API吗?

This link might help you. 此链接可能会对您有所帮助。

DragSource class which provides the drag and drip API in SWT. DragSource class ,它在SWT中提供拖放API。

http://www.java2s.com/Tutorial/Java/0280__SWT/DraggingandDropping.htm http://www.java2s.com/Tutorial/Java/0280__SWT/DraggingandDropping.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM