antsnest.io
Class XMLFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by antsnest.io.XMLFileFilter

public class XMLFileFilter
extends FileFilter

A file filter that only accepts XML files

Author:
Chris Clohosy

Constructor Summary
XMLFileFilter()
          Constructs a new filter
 
Method Summary
 boolean accept(File file)
          Whether a file is an XML file
 String getDescription()
          A description of this filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFileFilter

public XMLFileFilter()
Constructs a new filter

Method Detail

accept

public boolean accept(File file)
Whether a file is an XML file

Specified by:
accept in class FileFilter
Parameters:
file - the file to check
Returns:
a boolean, whether the file is acceptable

getDescription

public String getDescription()
A description of this filter

Specified by:
getDescription in class FileFilter
Returns:
a String, the description