学用Java

奇新Java控件---Java控件提供商和Java RIA, Web, J2ME解决方案开发商

使用JComponentPack产品中的DefaultFileFilter

How to use DefaultFileFilter in JComponentPack


DefaultFileFilter provide a default file filter.

It also provides some useful methods, for example:

getExtensionNames()
Return all extension of this file filter as an array.
getExtensionName ()
Return the extension of the parameter.
It could accept 3 kinds of parameter, a File, a String, an URL.
getNameWithoutExtension(String name)
Returns the file name without extension, for example the file "readme.txt" will return "readme", include the absolute path.
getPreferredExtensionName() 
Returns the preferred extension of this file filter, actually is the first extension of your extensions. It equal this operation getExtensionNames()[0].

It inherits from FileFilter, have two Constructors to create a instance of the FileFilter.

DefaultFileFilter(String ext, String description)
The first parameter is extension, the second parameter is description of extension.
DefaultFileFilter(String[] ext, String description)
The first parameter are extensions, the second parameter is description of extensions.


posted on 2009-02-23 16:51 fralepg 阅读(286) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2009年2月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
1234567

导航

统计

公告

JComponentPack 3.0正式发布 功能介绍

JComponentPack 是一个基于Java SwingGUI类库,一系列可视化的JavaBeans集合,它基于SwingMVC架构,是100%的纯Java类库,它包括20多个Swing 所没有的控件

试用版下载(点击下载

常用链接

留言簿(1)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜