⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psfilter.java

📁 实现对owl-s描述服务的检索
💻 JAVA
字号:
/*
 * OWL-S Matchmaker
 * 
 * COPYRIGHT NOTICE
 * 
 * Copyright (C) 2005 DFKI GmbH, Germany
 * Developed by Benedikt Fries, Matthias Klusch
 * 
 * The code is free for non-commercial use only.
 * You can redistribute it and/or modify it under the terms
 * of the Mozilla Public License version 1.1  as
 * published by the Mozilla Foundation at
 * http://www.mozilla.org/MPL/MPL-1.1.txt
 * 
 */

package owlsmx.gui.util.filefilter;
import java.io.File;

import javax.swing.filechooser.FileFilter;

public class PSFilter extends FileFilter implements java.io.Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = -7098241499475219037L;

	//Accept all directories and all gif, jpg, tiff, or png files.
    public boolean accept(File f) {
        if ( (f.isDirectory())|| (f.getAbsolutePath().indexOf(".")<0) ) {
            return false;
        }
        
        String extension = f.getAbsolutePath().toLowerCase();
        if (extension != null) {
        extension = extension.substring(extension.lastIndexOf("."));        
        	if (extension.indexOf("ps")>=0)
	                    return true;
	        else
	        	return false;	            
	        }

	    return false;
    	}

    //The description of this filter
    public String getDescription() {
    	return "PS";
    }
}

⌨️ 快捷键说明

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