Package thinletcommons
Class ExtensionFileFilter
java.lang.Object
thinletcommons.ExtensionFileFilter
- All Implemented Interfaces:
FileFilter
A file filter for
FileChooser that accepts files based on file
name endings (extensions).
Note that the file filter is case sensitive. That is a file filter instance
created with new ExtensionFileFilter("xml", "XML files")
accepts file.xml but not FILE.XML.
- Author:
- Dirk Moebius
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionFileFilter(String extension, String description) Create a new ExceptionFileFilter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the given file is accepted by this filter.A human readable description of this file filter.
-
Constructor Details
-
ExtensionFileFilter
Create a new ExceptionFileFilter.- Parameters:
extension- the extention, for example "xml", "jpg", etc.description- the description.
-
-
Method Details
-
accept
Whether the given file is accepted by this filter.- Specified by:
acceptin interfaceFileFilter
-
getDescription
A human readable description of this file filter.- Specified by:
getDescriptionin interfaceFileFilter
-