bodhidharma.utilities
Class FileFilterRecordings

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bodhidharma.utilities.FileFilterRecordings

public class FileFilterRecordings
extends javax.swing.filechooser.FileFilter

A file filter for the RecordingsPanel class. Implements the two methods of the FileFilter abstract class.

Filters all files and directories except MIDI files (ending with .mid or .midi) that are not already parsed by the RecordingsPanel. Directories are only allowed if no recordings are currently loaded (i.e. the constructor parameter already_loaded_file_paths is null.

See Also:
FileFilter, RecordingsPanel
Author:
Cory McKay

Constructor Summary
FileFilterRecordings(java.lang.String[] already_loaded_file_paths)
          Intantiates the filter and stores the names of files that have already been loaded
 
Method Summary
 boolean accept(java.io.File f)
           
 java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFilterRecordings

public FileFilterRecordings(java.lang.String[] already_loaded_file_paths)
Intantiates the filter and stores the names of files that have already been loaded

Parameters:
already_loaded_file_names - Names of files that are alreading loaded in the RecordingsPanel.
See Also:
RecordingsPanel
Author:
Cory McKay
Method Detail

accept

public boolean accept(java.io.File f)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter