|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--org.gjt.btools.ext.ExtensionFilenameFilter
A filename filter that accepts or rejects files based on their extension. Note that this class both implements java.io.FilenameFilter and extends javax.swing.filechooser.FileFilter.
A file will pass through this filter only if its name ends with the required string. String comparisons are not case sensitive.
All directories will be accepted by this filter; they will not be put through the extension test.
| Constructor Summary | |
ExtensionFilenameFilter(java.lang.String extension,
java.lang.String description)
Creates a new filter that only accepts files ending with the given string (ignoring case). |
|
| Method Summary | |
boolean |
accept(java.io.File file)
Determines whether or not a file will pass through this filter. |
boolean |
accept(java.io.File dir,
java.lang.String name)
Determines whether or not a file will pass through this filter. |
java.lang.String |
getDescription()
Returns a description of this filter. |
java.lang.String |
getExtension()
Returns the extension associated with this filter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExtensionFilenameFilter(java.lang.String extension,
java.lang.String description)
extension - the string with which a filename should end.
For correct results for standard dot extensions (.foo),
this string should include the leading dot.description - a description of this filter.| Method Detail |
public java.lang.String getExtension()
public java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilter
public boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilterdir - the directory in which the file resides.name - the name of the file.
public boolean accept(java.io.File file)
accept in class javax.swing.filechooser.FileFilterfile - the file in question.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||