Flop
Class FlopFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--Flop.FlopFileFilter

public class FlopFileFilter
extends javax.swing.filechooser.FileFilter


Constructor Summary
FlopFileFilter()
          Creates a file filter.
FlopFileFilter(java.lang.String extension)
          Creates a file filter that accepts files with the given extension.
FlopFileFilter(java.lang.String[] filters)
          Creates a file filter from the given string array.
FlopFileFilter(java.lang.String[] filters, java.lang.String description)
          Creates a file filter from the given string array and description.
FlopFileFilter(java.lang.String extension, java.lang.String description)
          Creates a file filter that accepts the given file type.
 
Method Summary
 boolean accept(java.io.File f)
          Return true if this file should be shown in the directory pane, false if it shouldn't.
 void addExtension(java.lang.String extension)
          Adds a filetype "dot" extension to filter against.
 java.lang.String getDescription()
          Returns the human readable description of this filter.
 java.lang.String getExtension(java.io.File f)
          Return the extension portion of the file's name .
 boolean isExtensionListInDescription()
          Returns whether the extension list (.jpg, .gif, etc) should show up in the human readable description.
 void setDescription(java.lang.String description)
          Sets the human readable description of this filter.
 void setExtensionListInDescription(boolean b)
          Determines whether the extension list (.jpg, .gif, etc) should show up in the human readable description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlopFileFilter

public FlopFileFilter()
Creates a file filter. If no filters are added, then all files are accepted.

FlopFileFilter

public FlopFileFilter(java.lang.String extension)
Creates a file filter that accepts files with the given extension.

FlopFileFilter

public FlopFileFilter(java.lang.String extension,
                      java.lang.String description)
Creates a file filter that accepts the given file type.

FlopFileFilter

public FlopFileFilter(java.lang.String[] filters)
Creates a file filter from the given string array.

FlopFileFilter

public FlopFileFilter(java.lang.String[] filters,
                      java.lang.String description)
Creates a file filter from the given string array and description.
Method Detail

accept

public boolean accept(java.io.File f)
Return true if this file should be shown in the directory pane, false if it shouldn't.
Overrides:
accept in class javax.swing.filechooser.FileFilter

getExtension

public java.lang.String getExtension(java.io.File f)
Return the extension portion of the file's name .

addExtension

public void addExtension(java.lang.String extension)
Adds a filetype "dot" extension to filter against.

getDescription

public java.lang.String getDescription()
Returns the human readable description of this filter. For
Overrides:
getDescription in class javax.swing.filechooser.FileFilter

setDescription

public void setDescription(java.lang.String description)
Sets the human readable description of this filter.

setExtensionListInDescription

public void setExtensionListInDescription(boolean b)
Determines whether the extension list (.jpg, .gif, etc) should show up in the human readable description.

isExtensionListInDescription

public boolean isExtensionListInDescription()
Returns whether the extension list (.jpg, .gif, etc) should show up in the human readable description.