Java 2 Platform
v1.3

edu.umich.visualsoar.misc
Class SoarFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--edu.umich.visualsoar.misc.SoarFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class SoarFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FilenameFilter

This class describes the filter of a JFileChooser


Constructor Summary
SoarFileFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          Will only accept files with a vsa extension
 boolean accept(java.io.File dir, java.lang.String name)
          Same as the other accept method, but included for compatibilty with the FilenameFilter interface used for native dialogs
 java.lang.String getDescription()
           
private  java.lang.String getSuffix(java.io.File f)
          Gets a suffix off a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoarFileFilter

public SoarFileFilter()
Method Detail

accept

public boolean accept(java.io.File f)
Will only accept files with a vsa extension

Specified by:
accept in class javax.swing.filechooser.FileFilter
Returns:
true if the file ends with vsa or is a folder false otherwise

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Same as the other accept method, but included for compatibilty with the FilenameFilter interface used for native dialogs

Specified by:
accept in interface java.io.FilenameFilter
Returns:
true if the file ends with vsa or is a folder false otherwise

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
a string describing the filefilter

getSuffix

private java.lang.String getSuffix(java.io.File f)
Gets a suffix off a file

Parameters:
f - the file to examine
Returns:
the suffix of the file

Java 2 Platform
v1.3