程序包 weka.gui
类 ExtensionFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
weka.gui.ExtensionFileFilter
- 所有已实现的接口:
FilenameFilter
,Serializable
Provides a file filter for FileChoosers that accepts or rejects files
based on their extension. Compatible with both java.io.FilenameFilter and
javax.swing.filechooser.FileFilter (why there are two I have no idea).
- 版本:
- $Revision: 1.8 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器构造器说明ExtensionFileFilter
(String[] extensions, String description) Creates an ExtensionFileFilter that accepts files that have any of the extensions contained in the supplied array.ExtensionFileFilter
(String extension, String description) Creates the ExtensionFileFilter -
方法概要
修饰符和类型方法说明boolean
Returns true if the supplied file should be accepted (i.e.: if it has the required extension or is a directory).boolean
Returns true if the file in the given directory with the given name should be accepted.Gets the description of accepted files.String[]
Returns a copy of the acceptable extensions.
-
构造器详细资料
-
ExtensionFileFilter
Creates the ExtensionFileFilter- 参数:
extension
- the extension of accepted files.description
- a text description of accepted files.
-
ExtensionFileFilter
Creates an ExtensionFileFilter that accepts files that have any of the extensions contained in the supplied array.- 参数:
extensions
- an array of acceptable file extensions (as Strings).description
- a text description of accepted files.
-
-
方法详细资料
-
getDescription
Gets the description of accepted files.- 指定者:
getDescription
在类中FileFilter
- 返回:
- the description.
-
getExtensions
Returns a copy of the acceptable extensions.- 返回:
- the accepted extensions
-
accept
Returns true if the supplied file should be accepted (i.e.: if it has the required extension or is a directory).- 指定者:
accept
在类中FileFilter
- 参数:
file
- the file of interest.- 返回:
- true if the file is accepted by the filter.
-
accept
Returns true if the file in the given directory with the given name should be accepted.- 指定者:
accept
在接口中FilenameFilter
- 参数:
dir
- the directory where the file resides.name
- the name of the file.- 返回:
- true if the file is accepted.
-