|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
beowulf.filefilters.ExtensionFileFilter
This class represents a filter that accepts a file based on its
extension. The extension of the file is compared to the
extension given to the filter on creation. The period character,
".", must begin the extension.
| Field Summary | |
protected String |
extension
The extension that all acceptable files must have. |
| Constructor Summary | |
ExtensionFileFilter(String newExtension)
Creates an instance of this object with the indicated extension. |
|
| Method Summary | |
boolean |
accept(File f)
This filter will accept a file f if and only if the last
four characters of its name are the indicated extension. |
String |
getDescription()
This method returns a description of what files are accepted by this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String extension
| Constructor Detail |
public ExtensionFileFilter(String newExtension)
| Method Detail |
public boolean accept(File f)
f if and only if the last
four characters of its name are the indicated extension. Directories
are also accepted.
f - The file to accept or reject
public String getDescription()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||