Package org.jfree.ui
Class ExtensionFileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- org.jfree.ui.ExtensionFileFilter
-
public class ExtensionFileFilter extends FileFilter
A filter for JFileChooser that filters files by extension.- Author:
- David Gilbert
-
-
Constructor Summary
Constructors Constructor Description ExtensionFileFilter(String description, String extension)
Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(File file)
Returns true if the file ends with the specified extension.String
getDescription()
Returns the description of the filter.
-
-
-
Method Detail
-
accept
public boolean accept(File file)
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
public String getDescription()
Returns the description of the filter.- Specified by:
getDescription
in classFileFilter
- Returns:
- a description of the filter.
-
-