Package org.jfree.ui
Class ExtensionFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
org.jfree.ui.ExtensionFileFilter
- Direct Known Subclasses:
JavaSourceCollector.CollectorFileFilter
A filter for JFileChooser that filters files by extension.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExtensionFileFilter
(String description, String extension) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the file ends with the specified extension.Returns the description of the filter.
-
Field Details
-
description
A description for the file type. -
extension
The extension (for example, "png" for *.png files).
-
-
Constructor Details
-
ExtensionFileFilter
Standard constructor.- Parameters:
description
- a description of the file type;extension
- the file extension;
-
-
Method Details
-
accept
Returns true if the file ends with the specified extension.- Specified by:
accept
in classFileFilter
- Parameters:
file
- the file to test.- Returns:
- A boolean that indicates whether or not the file is accepted by the filter.
-
getDescription
Returns the description of the filter.- Specified by:
getDescription
in classFileFilter
- Returns:
- a description of the filter.
-