亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? examplefilefilter.java

?? java 聊天工具 包括服務(wù)器 和 客戶端 類似
?? JAVA
字號:
/*
 * @(#)ExampleFileFilter.java	1.16 04/07/26
 * 
 * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * -Redistribution of source code must retain the above copyright notice, this
 *  list of conditions and the following disclaimer.
 * 
 * -Redistribution in binary form must reproduce the above copyright notice, 
 *  this list of conditions and the following disclaimer in the documentation
 *  and/or other materials provided with the distribution.
 * 
 * Neither the name of Sun Microsystems, Inc. or the names of contributors may 
 * be used to endorse or promote products derived from this software without 
 * specific prior written permission.
 * 
 * This software is provided "AS IS," without a warranty of any kind. ALL 
 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
 * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
 * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN")
 * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST 
 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, 
 * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY 
 * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 
 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 * 
 * You acknowledge that this software is not designed, licensed or intended
 * for use in the design, construction, operation or maintenance of any
 * nuclear facility.
 */

/*
 * @(#)ExampleFileFilter.java	1.16 04/07/26
 */


import java.io.File;
import java.util.Hashtable;
import java.util.Enumeration;
import javax.swing.*;
import javax.swing.filechooser.*;

/**
 * A convenience implementation of FileFilter that filters out
 * all files except for those type extensions that it knows about.
 *
 * Extensions are of the type ".foo", which is typically found on
 * Windows and Unix boxes, but not on Macinthosh. Case is ignored.
 *
 * Example - create a new filter that filerts out all files
 * but gif and jpg image files:
 *
 *     JFileChooser chooser = new JFileChooser();
 *     ExampleFileFilter filter = new ExampleFileFilter(
 *                   new String{"gif", "jpg"}, "JPEG & GIF Images")
 *     chooser.addChoosableFileFilter(filter);
 *     chooser.showOpenDialog(this);
 *
 * @version 1.16 07/26/04
 * @author Jeff Dinkins
 */
public class ExampleFileFilter extends FileFilter {

    private static String TYPE_UNKNOWN = "Type Unknown";
    private static String HIDDEN_FILE = "Hidden File";

    private Hashtable filters = null;
    private String description = null;
    private String fullDescription = null;
    private boolean useExtensionsInDescription = true;

    /**
     * Creates a file filter. If no filters are added, then all
     * files are accepted.
     *
     * @see #addExtension
     */
    public ExampleFileFilter() {
	this.filters = new Hashtable();
    }

    /**
     * Creates a file filter that accepts files with the given extension.
     * Example: new ExampleFileFilter("jpg");
     *
     * @see #addExtension
     */
    public ExampleFileFilter(String extension) {
	this(extension,null);
    }

    /**
     * Creates a file filter that accepts the given file type.
     * Example: new ExampleFileFilter("jpg", "JPEG Image Images");
     *
     * Note that the "." before the extension is not needed. If
     * provided, it will be ignored.
     *
     * @see #addExtension
     */
    public ExampleFileFilter(String extension, String description) {
	this();
	if(extension!=null) addExtension(extension);
 	if(description!=null) setDescription(description);
    }

    /**
     * Creates a file filter from the given string array.
     * Example: new ExampleFileFilter(String {"gif", "jpg"});
     *
     * Note that the "." before the extension is not needed adn
     * will be ignored.
     *
     * @see #addExtension
     */
    public ExampleFileFilter(String[] filters) {
	this(filters, null);
    }

    /**
     * Creates a file filter from the given string array and description.
     * Example: new ExampleFileFilter(String {"gif", "jpg"}, "Gif and JPG Images");
     *
     * Note that the "." before the extension is not needed and will be ignored.
     *
     * @see #addExtension
     */
    public ExampleFileFilter(String[] filters, String description) {
	this();
	for (int i = 0; i < filters.length; i++) {
	    // add filters one by one
	    addExtension(filters[i]);
	}
 	if(description!=null) setDescription(description);
    }

    /**
     * Return true if this file should be shown in the directory pane,
     * false if it shouldn't.
     *
     * Files that begin with "." are ignored.
     *
     * @see #getExtension
     * @see FileFilter#accepts
     */
    public boolean accept(File f) {
	if(f != null) {
	    if(f.isDirectory()) {
		return true;
	    }
	    String extension = getExtension(f);
	    if(extension != null && filters.get(getExtension(f)) != null) {
		return true;
	    };
	}
	return false;
    }

    /**
     * Return the extension portion of the file's name .
     *
     * @see #getExtension
     * @see FileFilter#accept
     */
     public String getExtension(File f) {
	if(f != null) {
	    String filename = f.getName();
	    int i = filename.lastIndexOf('.');
	    if(i>0 && i<filename.length()-1) {
		return filename.substring(i+1).toLowerCase();
	    };
	}
	return null;
    }

    /**
     * Adds a filetype "dot" extension to filter against.
     *
     * For example: the following code will create a filter that filters
     * out all files except those that end in ".jpg" and ".tif":
     *
     *   ExampleFileFilter filter = new ExampleFileFilter();
     *   filter.addExtension("jpg");
     *   filter.addExtension("tif");
     *
     * Note that the "." before the extension is not needed and will be ignored.
     */
    public void addExtension(String extension) {
	if(filters == null) {
	    filters = new Hashtable(5);
	}
	filters.put(extension.toLowerCase(), this);
	fullDescription = null;
    }


    /**
     * Returns the human readable description of this filter. For
     * example: "JPEG and GIF Image Files (*.jpg, *.gif)"
     *
     * @see setDescription
     * @see setExtensionListInDescription
     * @see isExtensionListInDescription
     * @see FileFilter#getDescription
     */
    public String getDescription() {
	if(fullDescription == null) {
	    if(description == null || isExtensionListInDescription()) {
 		fullDescription = description==null ? "(" : description + " (";
		// build the description from the extension list
		Enumeration extensions = filters.keys();
		if(extensions != null) {
		    fullDescription += "." + (String) extensions.nextElement();
		    while (extensions.hasMoreElements()) {
			fullDescription += ", ." + (String) extensions.nextElement();
		    }
		}
		fullDescription += ")";
	    } else {
		fullDescription = description;
	    }
	}
	return fullDescription;
    }

    /**
     * Sets the human readable description of this filter. For
     * example: filter.setDescription("Gif and JPG Images");
     *
     * @see setDescription
     * @see setExtensionListInDescription
     * @see isExtensionListInDescription
     */
    public void setDescription(String description) {
	this.description = description;
	fullDescription = null;
    }

    /**
     * Determines whether the extension list (.jpg, .gif, etc) should
     * show up in the human readable description.
     *
     * Only relevent if a description was provided in the constructor
     * or using setDescription();
     *
     * @see getDescription
     * @see setDescription
     * @see isExtensionListInDescription
     */
    public void setExtensionListInDescription(boolean b) {
	useExtensionsInDescription = b;
	fullDescription = null;
    }

    /**
     * Returns whether the extension list (.jpg, .gif, etc) should
     * show up in the human readable description.
     *
     * Only relevent if a description was provided in the constructor
     * or using setDescription();
     *
     * @see getDescription
     * @see setDescription
     * @see setExtensionListInDescription
     */
    public boolean isExtensionListInDescription() {
	return useExtensionsInDescription;
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜电影网站| 在线免费精品视频| 一区二区三区在线免费视频| 欧美日韩国产综合视频在线观看 | 伊人一区二区三区| 日韩欧美一区在线观看| 91在线无精精品入口| 久国产精品韩国三级视频| 一区二区三区免费| 欧美国产乱子伦| 91精品国产aⅴ一区二区| 91麻豆国产在线观看| 国产一区二区三区观看| 热久久久久久久| 亚洲卡通动漫在线| 欧美国产禁国产网站cc| 日韩欧美在线网站| 欧美精品高清视频| 日本精品裸体写真集在线观看 | 99精品视频一区二区| 老汉av免费一区二区三区| 一区二区三区欧美日| 国产精品女主播av| 国产亚洲1区2区3区| 欧美一级夜夜爽| 欧美性猛交一区二区三区精品| www.视频一区| 成人免费看片app下载| 国产麻豆午夜三级精品| 裸体在线国模精品偷拍| 日韩福利视频网| 亚洲成人免费av| 一区二区三区在线视频免费 | 色综合视频在线观看| 国产剧情一区在线| 国产精品一级片在线观看| 久久福利资源站| 国内精品国产成人国产三级粉色| 日韩**一区毛片| 日韩高清在线电影| 日韩高清电影一区| 美日韩一区二区三区| 免费在线一区观看| 精久久久久久久久久久| 精品在线一区二区| 国产一二精品视频| 高清在线成人网| 不卡一区二区三区四区| 91在线播放网址| 色哟哟在线观看一区二区三区| 91小视频在线观看| 91激情五月电影| 欧美性大战xxxxx久久久| 欧美日韩高清在线播放| 欧美大片拔萝卜| 2021国产精品久久精品| 国产精品久久久久久福利一牛影视| 久久久久久日产精品| 中文字幕二三区不卡| 亚洲欧洲av一区二区三区久久| 国产精品久久久久婷婷二区次| 国产精品久久三| 亚洲尤物视频在线| 免费不卡在线观看| 国产精品123区| 成人av影院在线| 欧美性猛片aaaaaaa做受| 日韩一区国产二区欧美三区| 久久久久9999亚洲精品| 亚洲人成小说网站色在线| 亚洲成人你懂的| 国精品**一区二区三区在线蜜桃| 成人av在线资源网| 欧美日韩精品高清| 国产亚洲午夜高清国产拍精品| 国产精品乱子久久久久| 亚洲午夜av在线| 国产一区二区在线看| 99久精品国产| 91麻豆精品91久久久久久清纯| 国产欧美日韩另类一区| 亚洲一区二区精品视频| 国产精品一线二线三线精华| 在线一区二区观看| 久久夜色精品国产噜噜av| 一区二区三区四区不卡视频| 麻豆精品久久久| 色综合天天综合网天天狠天天| 4438x亚洲最大成人网| 国产精品美女久久福利网站| 亚洲成人中文在线| 成人涩涩免费视频| 91麻豆精品国产| 亚洲人成网站精品片在线观看| 精品一区二区三区视频| 色综合久久天天综合网| 久久久久久久久久久黄色| 亚洲成人免费影院| 91在线观看免费视频| 久久免费电影网| 人人精品人人爱| 欧洲精品一区二区三区在线观看| 国产欧美日韩精品在线| 青青草原综合久久大伊人精品 | 天天综合网 天天综合色| 成人性生交大片| 欧美一区二区三区在| 亚洲精品国久久99热| 国产精品888| 88在线观看91蜜桃国自产| 亚洲色图欧美在线| 成人美女视频在线观看18| 日韩一级成人av| 亚洲大片一区二区三区| 91免费精品国自产拍在线不卡| www久久精品| 精品一区二区三区日韩| 欧美精品一二三| 亚洲在线视频一区| 99久久综合狠狠综合久久| 久久精品欧美日韩精品| 蜜桃视频在线观看一区二区| 欧美精品高清视频| 亚洲国产精品一区二区久久恐怖片 | 男男成人高潮片免费网站| 欧美中文字幕一区二区三区| ●精品国产综合乱码久久久久| 粉嫩欧美一区二区三区高清影视| 久久久久久久久久看片| 国产一区二区三区免费看| 精品久久久久久最新网址| 精品在线亚洲视频| 精品美女一区二区| 韩国女主播成人在线观看| 日韩精品中文字幕一区二区三区 | 国产精品国产三级国产三级人妇 | 91网站视频在线观看| 亚洲欧美综合网| a亚洲天堂av| 亚洲精品欧美激情| 色综合久久综合网97色综合| 一区二区三区av电影| 色婷婷综合久色| 亚洲bt欧美bt精品777| 6080午夜不卡| 老司机精品视频在线| 久久久久久久综合| 成人高清av在线| 亚洲精选一二三| 欧美综合欧美视频| 日韩综合在线视频| 欧美成人vps| 国产成人av电影在线观看| 国产精品免费免费| 欧美亚洲禁片免费| 日本va欧美va欧美va精品| 欧美精品一区二区精品网| 床上的激情91.| 亚洲视频你懂的| 精品视频1区2区| 九色综合国产一区二区三区| 国产精品嫩草久久久久| 色www精品视频在线观看| 五月天丁香久久| 精品国产一区二区三区av性色| 成人一区二区三区中文字幕| 一区二区三区四区精品在线视频| 欧美日本国产一区| 国产精品一二三在| 一区av在线播放| 精品国产sm最大网站| 一本久久综合亚洲鲁鲁五月天| 午夜精品福利久久久| 国产人成亚洲第一网站在线播放| 成人av网在线| 日产国产欧美视频一区精品| 欧美激情一区二区在线| 欧美天堂一区二区三区| 国产在线视频精品一区| 亚洲美女电影在线| 亚洲精品在线观看网站| 色综合天天综合在线视频| 久久精品理论片| 亚洲欧美日韩电影| 欧美va亚洲va香蕉在线| 91久久精品网| 国产毛片精品国产一区二区三区| 亚洲靠逼com| 国产日产精品1区| 欧美高清视频一二三区| 高清av一区二区| 奇米影视一区二区三区| 国产精品蜜臀在线观看| 日韩精品一区二区三区蜜臀| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩一卡二卡三卡四卡| 成人av网站在线| 国内精品伊人久久久久av影院| 亚洲国产欧美一区二区三区丁香婷| 国产午夜精品在线观看|