public class ExtensionFileFilter extends javax.swing.filechooser.FileFilter
Constructor | Description |
---|---|
ExtensionFileFilter(java.lang.String description,
java.lang.String extension) |
Standard constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
accept(java.io.File file) |
Returns true if the file ends with the specified extension.
|
java.lang.String |
getDescription() |
Returns the description of the filter.
|
public ExtensionFileFilter(java.lang.String description, java.lang.String extension)
description
- a description of the file type;extension
- the file extension;public boolean accept(java.io.File file)
accept
in class javax.swing.filechooser.FileFilter
file
- the file to test.public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter