Package org.jfree.ui
Class ExtensionFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
org.jfree.ui.ExtensionFileFilter
A filter for JFileChooser that filters files by extension.
- Author:
- David Gilbert
-
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.
-
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.
-