org.jfree.ui
Class FilesystemFilter
FileFilter
org.jfree.ui.FilesystemFilter
- FilenameFilter
extends FileFilter
implements FilenameFilter
A filesystem filter.
FilesystemFilter(String fileext, String descr) - Creates a new filter.
|
FilesystemFilter(String fileext, String descr, boolean accDirs) - Creates a new filter.
|
FilesystemFilter(String[] fileext, String descr, boolean accDirs) - Creates a new filter.
|
boolean | accept(File dir) - Returns
true if the specified file matches the requirements of this
filter, and false otherwise.
|
boolean | accept(File dir, String name) - Returns
true if the file is accepted, and false otherwise.
|
void | acceptDirectories(boolean b) - Sets the flag that controls whether or not the filter accepts directories.
|
boolean | acceptsDirectories() - Returns the flag that indicates whether or not the filter accepts directories.
|
String | getDescription() - Returns the filter description.
|
FilesystemFilter
public FilesystemFilter(String fileext,
String descr)
Creates a new filter.
fileext
- the file extension.descr
- the description.
FilesystemFilter
public FilesystemFilter(String fileext,
String descr,
boolean accDirs)
Creates a new filter.
fileext
- the file extension.descr
- the description.accDirs
- accept directories?
FilesystemFilter
public FilesystemFilter(String[] fileext,
String descr,
boolean accDirs)
Creates a new filter.
fileext
- the file extension.descr
- the description.accDirs
- accept directories?
accept
public boolean accept(File dir)
Returns true
if the specified file matches the requirements of this
filter, and false
otherwise.
dir
- the file or directory.
accept
public boolean accept(File dir,
String name)
Returns true
if the file is accepted, and false
otherwise.
dir
- the directory.name
- the file name.
acceptDirectories
public void acceptDirectories(boolean b)
Sets the flag that controls whether or not the filter accepts directories.
acceptsDirectories
public boolean acceptsDirectories()
Returns the flag that indicates whether or not the filter accepts directories.
getDescription
public String getDescription()
Returns the filter description.