Package org.jfree.ui
Class FilesystemFilter
java.lang.Object
javax.swing.filechooser.FileFilter
org.jfree.ui.FilesystemFilter
- All Implemented Interfaces:
FilenameFilter
A filesystem filter.
- Author:
- David Gilbert
-
Constructor Summary
ConstructorsConstructorDescriptionFilesystemFilter(String[] fileext, String descr, boolean accDirs) Creates a new filter.FilesystemFilter(String fileext, String descr) Creates a new filter.FilesystemFilter(String fileext, String descr, boolean accDirs) Creates a new filter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the specified file matches the requirements of this filter, andfalseotherwise.booleanReturnstrueif the file is accepted, andfalseotherwise.voidacceptDirectories(boolean b) Sets the flag that controls whether or not the filter accepts directories.booleanReturns the flag that indicates whether or not the filter accepts directories.Returns the filter description.
-
Constructor Details
-
FilesystemFilter
Creates a new filter.- Parameters:
fileext- the file extension.descr- the description.
-
FilesystemFilter
Creates a new filter.- Parameters:
fileext- the file extension.descr- the description.accDirs- accept directories?
-
FilesystemFilter
Creates a new filter.- Parameters:
fileext- the file extension.descr- the description.accDirs- accept directories?- Throws:
NullPointerException- if the file extensions are null.
-
-
Method Details
-
accept
Returnstrueif the file is accepted, andfalseotherwise.- Specified by:
acceptin interfaceFilenameFilter- Parameters:
dir- the directory.name- the file name.- Returns:
- A boolean.
-
accept
Returnstrueif the specified file matches the requirements of this filter, andfalseotherwise.- Specified by:
acceptin classFileFilter- Parameters:
dir- the file or directory.- Returns:
- A boolean.
-
getDescription
Returns the filter description.- Specified by:
getDescriptionin classFileFilter- Returns:
- The filter description.
-
acceptDirectories
Sets the flag that controls whether or not the filter accepts directories.- Parameters:
b- a boolean.
-
acceptsDirectories
Returns the flag that indicates whether or not the filter accepts directories.- Returns:
- A boolean.
-