仅在 Swing 中选择的 SWT FileDialog 目录 [英] An SWT FileDialog Selected Directories Only in Swing

查看:24
本文介绍了仅在 Swing 中选择的 SWT FileDialog 目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Swing 应用程序,我想使用 Windows7/Vista 风格的 FileDialogs,并且找到了一个将 SWT 与 Swing 结合使用的合理解决方案:.你没有得到你想要的对话框,但至少你得到了一个增强版 (FolderChooser),它的优点很少:

  • 便利按钮(桌面、我的文档、...)
  • 删除/创建新目录
  • 地址栏

最重要的是:您可以免费获得它,因为它位于公共层"中.您可以通过启动 Demo-WebStart-Project 来试用 FolderChooser.

I have a swing app that I would like to use Windows7/Vista style FileDialogs and have found a reasonable solution using SWT in conjunction with swing: Does Swing support Windows 7-style file choosers?

However, now I'm trying to get this same dialog to accept only directories (the "Select Folder" button instead of the "Open" button).

I do not want to use the typical DirectoryDialog:



I want to use the Dialog with favorites on the left, address bar on the top, and the ability to select folders:

Anyone know how to accomplish this?

Replies are greatly appreciated.

解决方案

Baz already said it: It is not possible to get this dialog using SWT. To answer your question about other frameworks: I believe there are plenty, for example you could use Jide. You do not get the dialog you want, but at least you get an enhanced version (FolderChooser) with few advantages:

  • Convenience-Buttons (Desktop, My Documents, ...)
  • Delete/Create new directory
  • Address bar

And the best of all this: You get it for free, cause it's in the "Common Layer". You can try the FolderChooser by launching the Demo-WebStart-Project.

这篇关于仅在 Swing 中选择的 SWT FileDialog 目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆