## gate.util
Class ExtensionFileFilter

    java.lang.Object
      |
      +--javax.swing.filechooser.FileFilter
            |
            +--gate.util.ExtensionFileFilter

All Implemented Interfaces:
  FileFilter

public class ExtensionFileFilter
extends FileFilter
implements FileFilter

Implementation of a file filter This class is used by `JFileChooser` to filter the displayed files by their extension.

Field Summary
`private List` `acceptedExtensions` The set of accepted extensions
`private static boolean` `DEBUG` Debug flag
`private String` `description` The desciption of the accepted files.

Constructor Summary
`ExtensionFileFilter()` Builds a new ExtensionFileFilter

Method Summary
`boolean` `accept(File f)` Checks a file for compliance with the requested extensions.
`void` `addExtension(String ext)` Adds a new extension to the list of accepted extensions.
`String` `getDescription()` Returns the user-frielndly description for the files, e.g.
`void` `setDescription(String desc)` Sets the user friendly description for the accepted files.

Methods inherited from class java.lang.Object
`<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### DEBUG

    private static final boolean DEBUG

  Debug flag

### acceptedExtensions

    private List acceptedExtensions

  The set of accepted extensions

### description

    private String description

  The desciption of the accepted files.

Constructor Detail

### ExtensionFileFilter

    public ExtensionFileFilter()

  Builds a new ExtensionFileFilter

Method Detail

### accept

    public boolean accept(File f)

  Checks a file for compliance with the requested extensions.
  Specified by:
    `accept` in interface `FileFilter`
  Overrides:
    `accept` in class `FileFilter`
  Parameters:
    `f` -

### getDescription

    public String getDescription()

  Returns the user-frielndly description for the files, e.g. "Text files"
  Overrides:
    `getDescription` in class `FileFilter`

### addExtension

    public void addExtension(String ext)

  Adds a new extension to the list of accepted extensions.
  Parameters:
    `ext` -

### setDescription

    public void setDescription(String desc)

  Sets the user friendly description for the accepted files.
  Parameters:
    `desc` -