Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javatools.swing
Class SimpleFileFilter  view SimpleFileFilter download SimpleFileFilter.java

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended byjavatools.swing.SimpleFileFilter
All Implemented Interfaces:
java.io.FileFilter

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

It's an implementation of the file filter, accepting a set of extensions.

Version:
0.7

Field Summary
(package private)  java.lang.String description
          The description string.
(package private)  java.lang.String[] extensions
          The array containing the accepted extensions.
 
Constructor Summary
SimpleFileFilter(java.lang.String ext)
          Creates a new SimpleFileFilter, with default description.
SimpleFileFilter(java.lang.String[] exts, java.lang.String descr)
          Creates a new SimpleFileFilter, with an array of extensions and a description.
SimpleFileFilter(java.lang.String ext, java.lang.String descr)
          Creates a new SimpleFileFilter, with one extension and a description.
 
Method Summary
 boolean accept(java.io.File f)
          Checks if a certain file should be accepted or not.
 java.lang.String getDescription()
          Returns the description for this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extensions

java.lang.String[] extensions
The array containing the accepted extensions.


description

java.lang.String description
The description string.

Constructor Detail

SimpleFileFilter

public SimpleFileFilter(java.lang.String ext)
Creates a new SimpleFileFilter, with default description.


SimpleFileFilter

public SimpleFileFilter(java.lang.String ext,
                        java.lang.String descr)
Creates a new SimpleFileFilter, with one extension and a description.


SimpleFileFilter

public SimpleFileFilter(java.lang.String[] exts,
                        java.lang.String descr)
Creates a new SimpleFileFilter, with an array of extensions and a description.

Method Detail

getDescription

public java.lang.String getDescription()
Returns the description for this filter.


accept

public boolean accept(java.io.File f)
Checks if a certain file should be accepted or not.

Specified by:
accept in interface java.io.FileFilter