Class RegExpFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by RegExpFileFilter

public class RegExpFileFilter
extends javax.swing.filechooser.FileFilter

Created by IntelliJ IDEA. User: Administrator Date: 07.01.2005 Time: 16:48:04 To change this template use File | Settings | File Templates.


Constructor Summary
RegExpFileFilter(java.lang.String regExp, java.lang.String description)
          Constructs a file filter based on regular expressions.
 
Method Summary
 boolean accept(java.io.File file)
          Figures out, if a given file is accepted.
 java.lang.String getDescription()
          Returns human readable file type description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpFileFilter

public RegExpFileFilter(java.lang.String regExp,
                        java.lang.String description)
Constructs a file filter based on regular expressions.

Parameters:
regExp - Filename pattern as regular expressions
description - Human readable description of file type.
Method Detail

accept

public boolean accept(java.io.File file)
Figures out, if a given file is accepted.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - File to be matched against regular expression.
Returns:
true if matched.

getDescription

public java.lang.String getDescription()
Returns human readable file type description.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
File type description.