public class ExtensionFileFilter extends FileFilter
JFileChooser
, filtering regular files
according to their extensions.Constructor and Description |
---|
ExtensionFileFilter(String descString,
String[] extensions)
Constructs an file filter accepting regular files with given
extension and any directories.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file)
Whether the given file is regular file with recognized extension or a
directory.
|
String |
getDescription()
The description of this filter.
|
public ExtensionFileFilter(String descString, String[] extensions)
descString
- Description of this filter to be displayed.extensions
- List of all accepted extension, without the
separating dot. The empty String can be used to accept
files without extension. Case of extension is ignored.public boolean accept(File file)
accept
in class FileFilter
public String getDescription()
getDescription
in class FileFilter
Copyright © 2015–2021 Fiji. All rights reserved.