Enhydra 5.1 API

org.enhydra.tool.common
Class ExtensionFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--org.enhydra.tool.common.ExtensionFilter
All Implemented Interfaces:
java.io.FileFilter

public class ExtensionFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter

An implementation of FileFilter that filters out all files except for those matching a set of given extensions.


Constructor Summary
ExtensionFilter()
          Creates an extension file filter without an extensions set.
 
Method Summary
 boolean accept(java.io.File f)
          Return true if this file should be shown in a file chooser.
 void addExclusion(java.lang.String ex)
           
 void addExtension(java.lang.String in)
          Adds an an extension to the list of acceptable file types.
 java.lang.String getDescription()
          Returns the human readable description of this filter.
 java.lang.String getDescriptionTitle()
          Gets the portion of the description that does not include extensions.
 boolean isDirectoryValid()
           
 boolean isExcludeOnly()
           
 void setDescriptionTitle(java.lang.String d)
          Sets the portion of the description that does not include extensions.
 void setDirectoryValid(boolean valid)
           
 void setExcludeOnly(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionFilter

public ExtensionFilter()
Creates an extension file filter without an extensions set.

Method Detail

accept

public boolean accept(java.io.File f)
Return true if this file should be shown in a file chooser.

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in class javax.swing.filechooser.FileFilter

addExtension

public void addExtension(java.lang.String in)
Adds an an extension to the list of acceptable file types.


addExclusion

public void addExclusion(java.lang.String ex)

getDescription

public java.lang.String getDescription()
Returns the human readable description of this filter.

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

setDescriptionTitle

public void setDescriptionTitle(java.lang.String d)
Sets the portion of the description that does not include extensions.


getDescriptionTitle

public java.lang.String getDescriptionTitle()
Gets the portion of the description that does not include extensions.


setDirectoryValid

public void setDirectoryValid(boolean valid)

isDirectoryValid

public boolean isDirectoryValid()

isExcludeOnly

public boolean isExcludeOnly()

setExcludeOnly

public void setExcludeOnly(boolean b)

Enhydra 5.1 API