public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter
Constructor and Description |
---|
ExtensionFileFilter(java.lang.String extensions)
Creates a new ExtensionFilter object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Determines whether the given file is accepted by this filter.
|
java.lang.String |
getDescription()
Get the description of this filter
|
void |
setExtension(java.lang.String extensions)
Sets the extensions handled by this Filter
|
public ExtensionFileFilter(java.lang.String extensions)
extensions
- A list of extensions, separated by whitespaces or
commaspublic boolean accept(java.io.File file)
accept
in interface java.io.FileFilter
accept
in class javax.swing.filechooser.FileFilter
file
- the file to be testedpublic java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public void setExtension(java.lang.String extensions)
extensions
- A list of extensions, separated by whitespaces or
commas