comirva.io.filefilter
Class AudioFileFilter

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

public class AudioFileFilter
extends FileFilter
implements FileFilter

This class implements a FileFilter for audio files (*.wav, *.mp3, *.ogg, *.au and *.pcm files).


Constructor Summary
AudioFileFilter()
           
 
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

AudioFileFilter

public AudioFileFilter()
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()