dguitar.codecs
Class CodecFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bydguitar.codecs.CodecFileFilter
All Implemented Interfaces:
java.io.FileFilter, java.io.FilenameFilter
Direct Known Subclasses:
GPFileFilter, MIDFileFilter

public abstract class CodecFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter, java.io.FilenameFilter

Author:
Mauricio Gracia Gutiérrez

Constructor Summary
CodecFileFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          this method is equivalent to f.isDirectory() || accept(f.getName())
 boolean accept(java.io.File dir, java.lang.String name)
          This methos returns this.accept(name)
abstract  boolean accept(java.lang.String s)
          Override this method actually accept the Name of the file or not
abstract  java.lang.String getDescription()
          Returns a description of this CodeFilter
abstract  java.util.Vector getExtensions()
          This method returns the extension the codec handles Example: {".GP3",".GP4",".GTP"} if it is a Guitar Pro codec)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodecFileFilter

public CodecFileFilter()
Method Detail

getExtensions

public abstract java.util.Vector getExtensions()
This method returns the extension the codec handles Example: {".GP3",".GP4",".GTP"} if it is a Guitar Pro codec)

Returns:
and Vector of String with the extensions the codec supports

accept

public abstract boolean accept(java.lang.String s)
Override this method actually accept the Name of the file or not


accept

public final boolean accept(java.io.File f)
this method is equivalent to f.isDirectory() || accept(f.getName())

Specified by:
accept in interface java.io.FileFilter
See Also:
FileFilter.accept(java.io.File)

accept

public final boolean accept(java.io.File dir,
                            java.lang.String name)
This methos returns this.accept(name)

Specified by:
accept in interface java.io.FilenameFilter
See Also:
FilenameFilter.accept(java.io.File, java.lang.String)

getDescription

public abstract java.lang.String getDescription()
Returns a description of this CodeFilter

See Also:
FileFilter.getDescription()