core.filter
Class XMLFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by core.filter.XMLFileFilter

public class XMLFileFilter
extends javax.swing.filechooser.FileFilter

This class provides a file filter for filtering all but directories and the iTunes XML file. The XML file name is defined in the iTunesXML file class. This filter is used when the user is asked to locate the iTunes XML file if it was not found automatically.


Constructor Summary
XMLFileFilter()
          Creates a new XML File Filter object.
 
Method Summary
 boolean accept(java.io.File file)
          Determines whether or not the given file is either a directory of the iTunes XML file.
 java.lang.String getDescription()
          Returns the description of the iTunes XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFileFilter

public XMLFileFilter()
Creates a new XML File Filter object.

Method Detail

accept

public boolean accept(java.io.File file)
Determines whether or not the given file is either a directory of the iTunes XML file. If it is either one of these, the method returns true. Otherwise, the method returns false.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - the file to check if it is a directory or the iTunes XML file.
Returns:
whether or not the given file is either a directory or the iTunes XML file.

getDescription

public java.lang.String getDescription()
Returns the description of the iTunes XML file.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description of the iTunes XML file.