brain.gui.FileFilters
Class FileChooserImageFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by brain.gui.FileFilters.FileChooserImageFilter

public class FileChooserImageFilter
extends javax.swing.filechooser.FileFilter

FileChooserImageFilter is an class used by JFileChooser for filtering the set of files shown to the user. See FileNameExtensionFilter for an implementation that filters using the file name extension.

A FileChooserImageFilter can be set on a JFileChooser to keep unwanted files from appearing in the directory listing.

See Also:
FileNameExtensionFilter, JFileChooser.setFileFilter(javax.swing.filechooser.FileFilter), JFileChooser.addChoosableFileFilter(javax.swing.filechooser.FileFilter)

Constructor Summary
FileChooserImageFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          Whether the given file is accepted by this filter.
 java.lang.String getDescription()
          The description of this filter.
 java.lang.String getPostFix()
          A filter can end with a specific String
 void setPostFix(java.lang.String _postFix)
          Sets a filter with a specific ending.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooserImageFilter

public FileChooserImageFilter()
Method Detail

accept

public boolean accept(java.io.File f)
Whether the given file is accepted by this filter.

Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
The description of this filter. For example: "JPG and GIF Images"

Specified by:
getDescription in class javax.swing.filechooser.FileFilter

getPostFix

public java.lang.String getPostFix()
A filter can end with a specific String

Returns:
ending filter

setPostFix

public void setPostFix(java.lang.String _postFix)
Sets a filter with a specific ending.

Parameters:
_postFix - ending filter