Package at.ofai.music.beatroot
Class FileFilters
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- 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
Fields Modifier and Type Field and Description static FileFilters
csvFileFilter
protected java.lang.String
description
A text description of this file typestatic FileFilters
matchFileFilter
static FileFilters
midiFileFilter
static FileFilters
sndFileFilter
protected java.lang.String
suffix
The extension corresponding to this file typestatic FileFilters
textFileFilter
static FileFilters
tmfFileFilter
static FileFilters
waveFileFilter
-
Constructor Summary
Constructors Constructor and Description FileFilters(java.lang.String suff, java.lang.String desc)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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.
-
-
-
Field Detail
-
csvFileFilter
public static final FileFilters csvFileFilter
-
description
protected java.lang.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 java.lang.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(java.lang.String suff, java.lang.String desc)
Constructor- Parameters:
suff
- The extension (suffix) of the file namedesc
- 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 classjavax.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 classjavax.swing.filechooser.FileFilter
- Returns:
- A String describing the file type.
-
-