org.jaudiotagger.test
Class ExtractID3TagFromFile.MP3FileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.jaudiotagger.test.ExtractID3TagFromFile.MP3FileFilter
All Implemented Interfaces:
java.io.FileFilter
Enclosing class:
ExtractID3TagFromFile

final class ExtractID3TagFromFile.MP3FileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter


Field Summary
private  boolean allowDirectories
          allows Directories
 
Constructor Summary
  ExtractID3TagFromFile.MP3FileFilter()
          Create a default MP3FileFilter.
private ExtractID3TagFromFile.MP3FileFilter(boolean allowDirectories)
          Create an MP3FileFilter.
 
Method Summary
 boolean accept(java.io.File file)
          Determines whether or not the file is an mp3 file.
 java.lang.String getDescription()
          Returns the Name of the Filter for use in the Chooser Dialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowDirectories

private final boolean allowDirectories
allows Directories

Constructor Detail

ExtractID3TagFromFile.MP3FileFilter

public ExtractID3TagFromFile.MP3FileFilter()
Create a default MP3FileFilter. The allowDirectories field will default to false.


ExtractID3TagFromFile.MP3FileFilter

private ExtractID3TagFromFile.MP3FileFilter(boolean allowDirectories)
Create an MP3FileFilter. If allowDirectories is true, then this filter will accept directories as well as mp3 files. If it is false then only mp3 files will be accepted.

Parameters:
allowDirectories - whether or not to accept directories
Method Detail

accept

public final boolean accept(java.io.File file)
Determines whether or not the file is an mp3 file. If the file is a directory, whether or not is accepted depends upon the allowDirectories flag passed to the constructor.

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - the file to test
Returns:
true if this file or directory should be accepted

getDescription

public final java.lang.String getDescription()
Returns the Name of the Filter for use in the Chooser Dialog

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
The Description of the Filter