tnt.gui
Class FileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by tnt.gui.FileFilter

public class FileFilter
extends javax.swing.filechooser.FileFilter

Displays all directories and only those files whose extensions match those passed to an object of this class.

Version:
1.0 - 02/2006
Author:
Steven J. Castellucci

Constructor Summary
FileFilter(java.lang.String description, java.lang.String[] extensions)
          Extensions should be in lower case and passed with the leading "dot" (e.g., ".txt").
 
Method Summary
 boolean accept(java.io.File f)
           
 java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFilter

public FileFilter(java.lang.String description,
                  java.lang.String[] extensions)
Extensions should be in lower case and passed with the leading "dot" (e.g., ".txt").

Parameters:
description - a description of this filter.
extensions - an array of extensions to filter.
Method Detail

accept

public boolean accept(java.io.File f)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter


Copyright © 2006 Steven Castellucci and Scott MacKenzie. All Rights Reserved.