filechooserfilter.java
来自「用JAVA编写的绘图程序 功能简介: 支持存储」· Java 代码 · 共 40 行
JAVA
40 行
package drawsmart.itsv.menuber;import javax.swing.filechooser.*;import java.io.*;/** * <p>Title: 文件选择器接口实现</p> * <p>Description: 使用drawflow1.0的引擎</p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: 崔江</p> * @author not attributable * @version 1.0 */public class FileChooserFilter extends javax.swing.filechooser.FileFilter { private String ext=new String(""); private String Description=""; public FileChooserFilter(String Description,String ext) { this.ext=ext; this.Description=Description; } public boolean accept(File f) { String filename=f.getPath(); if(f.isDirectory()) return true; else if(filename.endsWith("."+ext)) return true; else return false; } public String getDescription() { return Description; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?