beowulf.filefilters
Class XMLFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
beowulf.filefilters.XMLFileFilter
- public class XMLFileFilter
- extends FileFilter
This class represents a filter that accepts only XML file. Realistically,
this class filters files based on their extensions. If a file ends in
".xml", it is assumed that the file is an XML file.
- Version:
- 1.0 11/7/2003
- Author:
- Andy Scukanec (ags at cs dot cornell dot edu)
|
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 ".xml". |
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 |
XMLFileFilter
public XMLFileFilter()
accept
public boolean accept(File f)
- This filter will accept a file
f if and only if the last
four characters of its name are ".xml". Directories are also accepted.
- Parameters:
f - The file to accept or reject
- Returns:
- True if and only if the file is accepted.
getDescription
public String getDescription()
- This method returns a description of what files are accepted by this
class.
- Returns:
- A description string.