turingmachine
Class CTMFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by turingmachine.CTMFileFilter

class CTMFileFilter
extends javax.swing.filechooser.FileFilter

Simple file filter.


Field Summary
private  java.lang.String mDescription
          Human readable description.
private  java.lang.String[] mExtensions
          List of extensions supported by this filter.
 
Constructor Summary
CTMFileFilter(java.lang.String aDescription, java.lang.String[] aExtensions)
          Constructor.
 
Method Summary
 boolean accept(java.io.File aFile)
          Check whether or not this file type is an accepted type.
 java.lang.String getDescription()
          Get the human readable form of what extensions this filter supports.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mExtensions

private java.lang.String[] mExtensions
List of extensions supported by this filter.


mDescription

private java.lang.String mDescription
Human readable description.

Constructor Detail

CTMFileFilter

public CTMFileFilter(java.lang.String aDescription,
                     java.lang.String[] aExtensions)
Constructor.

Parameters:
aDescription - Human readable description of filter.
aExtensions - Entensions allowed by this filter.
Method Detail

accept

public boolean accept(java.io.File aFile)
Check whether or not this file type is an accepted type.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
aFile - The file that is to be tested.
Returns:
true, the file is an accepted type else false.

getDescription

public java.lang.String getDescription()
Get the human readable form of what extensions this filter supports.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
The description of this extension type.