cyfilefilter.java

来自「抽奖系统。营销活动现场」· Java 代码 · 共 32 行

JAVA
32
字号
//CYFileFilter.javapackage com.cy;import javax.swing.filechooser.*;import java.io.*;public class CYFileFilter extends javax.swing.filechooser.FileFilter {  public CYFileFilter(){  }  /**   * Whether the given file is accepted by this filter.   */  public boolean accept(File f) {    boolean result = f.isDirectory();    if (!result){      String suffix = FileUtility.getSuffix(f);      if (suffix!=null){       result = suffix.equalsIgnoreCase("csv");      }    }   return result;  }  /**   * The description of this filter. For example: "JPG and GIF Images"   * @see javax.swing.filechooser.FileView#getName   */  public String getDescription() {    return "CSV Files (*.csv)";  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?