/*
 * CobFilter.java
 *
 * Created on May 14, 2001, 1:47 AM
 */

package cse605;

/**
 *
 * @author  adev
 * @version 
 */
public class CobFilter extends javax.swing.filechooser.FileFilter {

    /** Creates new CobFilter */
    public CobFilter() {
    }
   /**
    * Returns true if the file is a directory or its name ends with
    * .dgr
    *
    * @param f the file in question
    * @return true if the file is a directory or its name ends 
    * with ".drg"
    *
    */
   public boolean accept(java.io.File f) {
      if ( f != null ) {
	 return f.isDirectory() ||
	    f.getName().endsWith(".cob");
      } // end of if ()
      return false;
   }

   /**
    * Returns the textual description of the filter.
    *
    * @return the textual description of the filter.
    */
   public String getDescription() {
      return "Cob Files (*.cob)";
   }
}
