at.ofai.music.beatroot
Class FileFilters

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by at.ofai.music.beatroot.FileFilters

public class FileFilters
extends javax.swing.filechooser.FileFilter

Implements a set of file filters for the file types used by BeatRoot. An object of this class represents a specific file type, which is identified by the extension of the file name.


Field Summary
static FileFilters csvFileFilter
           
protected  java.lang.String description
          A text description of this file type
static FileFilters matchFileFilter
           
static FileFilters midiFileFilter
           
static FileFilters sndFileFilter
           
protected  java.lang.String suffix
          The extension corresponding to this file type
static FileFilters textFileFilter
           
static FileFilters tmfFileFilter
           
static FileFilters waveFileFilter
           
 
Constructor Summary
FileFilters(java.lang.String suff, java.lang.String desc)
          Constructor
 
Method Summary
 boolean accept(java.io.File f)
          Checks file names for a given extension.
 java.lang.String getDescription()
          The description of the file type used in the file dialog's choice box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

suffix

protected java.lang.String suffix
The extension corresponding to this file type


description

protected java.lang.String description
A text description of this file type


waveFileFilter

public static final FileFilters waveFileFilter

sndFileFilter

public static final FileFilters sndFileFilter

midiFileFilter

public static final FileFilters midiFileFilter

tmfFileFilter

public static final FileFilters tmfFileFilter

textFileFilter

public static final FileFilters textFileFilter

csvFileFilter

public static final FileFilters csvFileFilter

matchFileFilter

public static final FileFilters matchFileFilter
Constructor Detail

FileFilters

public FileFilters(java.lang.String suff,
                   java.lang.String desc)
Constructor

Parameters:
suff - The extension (suffix) of the file name
desc - A text description of the file type
Method Detail

accept

public boolean accept(java.io.File f)
Checks file names for a given extension.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - The File object whose name is to be checked
Returns:
True for directories and files with the given extension.

getDescription

public java.lang.String getDescription()
The description of the file type used in the file dialog's choice box.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
A String describing the file type.