comirva.io.filefilter
Class MP3FileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by comirva.io.filefilter.MP3FileFilter
All Implemented Interfaces:
FileFilter

public class MP3FileFilter
extends FileFilter
implements FileFilter

This class implements a filter for MP3 files.


Constructor Summary
MP3FileFilter()
           
 
Method Summary
 boolean accept(File f)
          Returns true if the File f should be shown in the directory pane, false if this is not the case.
 String getDescription()
          Returns the description of the filter.
 String getExtension(File f)
          Returns the extension of the file's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MP3FileFilter

public MP3FileFilter()
Method Detail

accept

public boolean accept(File f)
Returns true if the File f should be shown in the directory pane, false if this is not the case.
Files that begin with "." are ignored.

Specified by:
accept in interface FileFilter
Specified by:
accept in class FileFilter
See Also:
FileFilter.accept(java.io.File)

getExtension

public String getExtension(File f)
Returns the extension of the file's name.

Parameters:
f - the File for which the extension should be returned
Returns:
a String containing the extension of the File f

getDescription

public String getDescription()
Returns the description of the filter.

Specified by:
getDescription in class FileFilter
See Also:
FileFilter.getDescription()