[英]How to determine which FileChooser ExtensionFilter has been selected - javafx
I having trouble related to javafx filechooser component. 我遇到与javafx filechooser组件有关的麻烦。 In filechooser javafx doesn't provide a way to get selected extension type(file extension selected in save as dropdown). 在filechooser中,javafx没有提供获取所选扩展名类型的方法(在“另存为”下拉列表中选择了文件扩展名)。 Same issue is also mentioned here . 这里也提到了同样的问题。 It is fixed in javafx 8 version. 它在javafx 8版本中已修复。 see here .it requires login. 看到这里。它需要登录。 I am using javafx 2.2. 我正在使用javafx 2.2。 Can somebody suggest a workaround for same using javafx 2.2? 有人可以建议使用javafx 2.2的解决方法吗?
Thanks! 谢谢!
It seems to be already implemented &/ or fixed. 它似乎已经实施和/或修复。 If what you exactly want is still no working for you with the latest javaFx version, than i guess you should use poj or apache commons: 如果最新的javaFx版本仍然无法满足您的需求,那么我猜您应该使用poj或apache commons:
The apache Commons library has FilenameUtils.getExtension()
or maybe: Java getting file extension without substring apache Commons库具有FilenameUtils.getExtension()
或: Java获取没有子字符串的文件扩展名
Note: The ticket indirect metioned by you ( http://javafx-jira.kenai.com/browse/RT-18836 ) is fixed since Feb, 8 2013 03:25 PM and they have also a test class for this in the ticket that, may help you: https://javafx-jira.kenai.com/secure/attachment/27646/TestFileChooser.java , just sign up and login to see all the related information ... 注意:您间接提及的票证( http://javafx-jira.kenai.com/browse/RT-18836 )已自2013年2月8日下午3:25修复,并且票证中对此也有一个测试类那可以帮助您: https : //javafx-jira.kenai.com/secure/attachment/27646/TestFileChooser.java ,只需注册并登录以查看所有相关信息...
Another interesting thread around this issue: http://forums.codeguru.com/showthread.php?421412.html%29 关于此问题的另一个有趣的线索: http : //forums.codeguru.com/showthread.php?421412.html%29
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.