View Javadoc

    1   package baseCode.gui.file;
    2
    3   import java.io.File;
    4
    5   import javax.swing.filechooser.FileFilter;
    6
    7   import baseCode.util.FileTools;
    8
    9   /***
    10   * <hr>
    11   * <p>
    12   * Copyright (c) 2004 Columbia University
    13   *
    14   * @author Will Braynen
    15   * @version $Id: DataFileFilter.java,v 1.3 2004/07/27 03:18:58 pavlidis Exp $
    16   */
    17  public class DataFileFilter extends FileFilter {
    18
    19     public boolean accept( File f ) {
    20
    21        if ( f.isDirectory() ) {
    22           return true;
    23        }
    24
    25        return FileTools.hasDataExtension( f.getName() );
    26
    27     } // end accept
    28
    29     public String getDescription() {
    30
    31        return "TXT data files";
    32     }
    33  }