|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
com.compomics.util.io.FilenameExtensionFilter
public class FilenameExtensionFilter
This class will implement a FilenameFilter that filters on the extension of files.
Constructor Summary | |
---|---|
FilenameExtensionFilter(String aExtension)
This constructor takes an extension to filter on. |
|
FilenameExtensionFilter(String aExtension,
String aDescription)
This constructor takes an extension to filter on. |
Method Summary | |
---|---|
boolean |
accept(File f)
|
boolean |
accept(File dir,
String name)
Tests if a specified file should be included in a file list. |
String |
getDescription()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilenameExtensionFilter(String aExtension)
aExtension
- String with the extension to filter. Note that
'.class' is identical to 'class'.public FilenameExtensionFilter(String aExtension, String aDescription)
aExtension
- String with the extension to filter. Note that
'.class' is identical to 'class'.aDescription
- String with the description for the FileFilter.
Can be null in which case the description will be an empty String.Method Detail |
---|
public boolean accept(File dir, String name)
accept
in interface FilenameFilter
dir
- the directory in which the file was found.name
- the name of the file.
true
if and only if the name should be
included in the file list; false
otherwise.public boolean accept(File f)
accept
in class FileFilter
public String getDescription()
getDescription
in class FileFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |