hydroScalingAPI.util.fileUtilities
Class DotFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by hydroScalingAPI.util.fileUtilities.DotFilter
All Implemented Interfaces:
java.io.FileFilter

public class DotFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter

An implementation of the FileFilter that allows files with a predetermined extension

Author:
Ricardo Mantilla

Constructor Summary
DotFilter(java.lang.String ext)
          Creates new DotFilter
 
Method Summary
 boolean accept(java.io.File p1)
          The accept criteria based on the file name
 java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotFilter

public DotFilter(java.lang.String ext)
Creates new DotFilter

Parameters:
ext - The desired extension or a comma separated lists of acceptable extensions. The filter asumes that the extension is the string after the last occurence of a period in the file name. Thus extension cannot have periods embedded.
Method Detail

accept

public boolean accept(java.io.File p1)
The accept criteria based on the file name

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
p1 - The file to filter
Returns:
true if and only if the file contains one of the extensions allowed

getDescription

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


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.