ocr.userinterface
Class FileTypeFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by ocr.userinterface.FileTypeFilter

public class FileTypeFilter
extends javax.swing.filechooser.FileFilter

Creates FileFilters to be used with FileChooser Code from: http://www.codejava.net/java-se/swing/add-file-filter-for-jfilechooser-dialog


Constructor Summary
FileTypeFilter(java.lang.String extension, java.lang.String description)
          Constructor
 
Method Summary
 boolean accept(java.io.File file)
          Determine if file can be accepted
 java.lang.String getDescription()
          File type display
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTypeFilter

public FileTypeFilter(java.lang.String extension,
                      java.lang.String description)
Constructor

Parameters:
extension - - file extension (ie ".txt")
description - - file description (ie "Text Document")
Method Detail

accept

public boolean accept(java.io.File file)
Determine if file can be accepted

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

getDescription

public java.lang.String getDescription()
File type display

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