简体   繁体   English

AWT文件选择器可以不访问OSX中的别名吗?

[英]Can AWT file choosers not access Aliases in OSX?

I need to use AWT file choosers for my java app because we want to give users the native mac file chooser. 我需要为我的Java应用程序使用AWT文件选择器,因为我们想为用户提供本机mac文件选择器。 Yes I know abut quaqua and we use it, but it does not use the native file chooser and mac users do not like it. 是的,我知道quaqua,我们使用它,但是它不使用本机文件选择器,mac用户不喜欢它。 The file chooser I am currently worried about sets the global propery: 我目前担心的文件选择器设置了全局属性:

System.setProperty("apple.awt.fileDialogForDirectories", "true");

This is done because I want the user to only be able to select a directory but for some reason I cannot navigate select or navigate through aliases. 这样做是因为我希望用户只能选择目录,但是由于某种原因,我无法导航选择或导航别名。 I have another file chooser that uses the same property listed above but in this one I set it to a FileDialog.SaveDialog and with this file chooser I can use aliases. 我有另一个文件选择器,它使用上面列出的相同属性,但是在此文件选择器中,我将其设置为FileDialog.SaveDialog,并使用此文件选择器可以使用别名。 Does anyone know if it is possible to use aliases an open style file chooser that can only select directories and can still use aliases? 有谁知道是否可以使用别名一个只能选择目录并且仍然可以使用别名的开放式文件选择器?

在Mac OS X 10.5.8,Java 1.5.0_22上,设置fileDialogForDirectories并使用为DIRECTORIES_ONLY设置的JFileChooser ,只要别名指向DIRECTORIES_ONLY ,我就可以浏览别名。

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

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