at.ofai.music.beatroot

Class FileFilters

public class FileFilters extends 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 FileFilterscsvFileFilter
protected Stringdescription
A text description of this file type
static FileFiltersmatchFileFilter
static FileFiltersmidiFileFilter
static FileFilterssndFileFilter
protected Stringsuffix
The extension corresponding to this file type
static FileFilterstextFileFilter
static FileFilterstmfFileFilter
static FileFilterswaveFileFilter
Constructor Summary
FileFilters(String suff, String desc)
Constructor
Method Summary
booleanaccept(File f)
Checks file names for a given extension.
StringgetDescription()
The description of the file type used in the file dialog's choice box.

Field Detail

csvFileFilter

public static final FileFilters csvFileFilter

description

protected String description
A text description of this file type

matchFileFilter

public static final FileFilters matchFileFilter

midiFileFilter

public static final FileFilters midiFileFilter

sndFileFilter

public static final FileFilters sndFileFilter

suffix

protected String suffix
The extension corresponding to this file type

textFileFilter

public static final FileFilters textFileFilter

tmfFileFilter

public static final FileFilters tmfFileFilter

waveFileFilter

public static final FileFilters waveFileFilter

Constructor Detail

FileFilters

public FileFilters(String suff, 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(File f)
Checks file names for a given extension.

Parameters: f The File object whose name is to be checked

Returns: True for directories and files with the given extension.

getDescription

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

Returns: A String describing the file type.