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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? swtresourcemanager.java

?? 可以實現P2P聊天通信
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.swtdesigner;import java.io.BufferedInputStream;import java.io.FileInputStream;import java.io.InputStream;import java.util.HashMap;import java.util.Iterator;import org.eclipse.jface.resource.CompositeImageDescriptor;import org.eclipse.swt.SWT;import org.eclipse.swt.graphics.*;import org.eclipse.swt.widgets.*;/** * Utility class for managing OS resources associated with SWT controls such as * colors, fonts, images, etc. *  * !!! IMPORTANT !!! Application code must explicitly invoke the <code>dispose()</code> * method to release the operating system resources managed by cached objects * when those objects and OS resources are no longer needed (e.g. on * application shutdown) *  * This class may be freely distributed as part of any application or plugin. * <p> * Copyright (c) 2003 - 2005, Instantiations, Inc. <br>All Rights Reserved *  * @author scheglov_ke * @author Dan Rubel */public class SWTResourceManager {    /**     * Dispose of cached objects and their underlying OS resources. This should     * only be called when the cached objects are no longer needed (e.g. on     * application shutdown)     */    public static void dispose() {        disposeColors();        disposeFonts();        disposeImages();        disposeCursors();    }    //////////////////////////////    // Color support    //////////////////////////////    /**     * Maps RGB values to colors     */    private static HashMap<RGB, Color> m_ColorMap = new HashMap<RGB, Color>();    /**     * Returns the system color matching the specific ID     * @param systemColorID int The ID value for the color     * @return Color The system color matching the specific ID     */    public static Color getColor(int systemColorID) {        Display display = Display.getCurrent();        return display.getSystemColor(systemColorID);    }    /**     * Returns a color given its red, green and blue component values     * @param r int The red component of the color     * @param g int The green component of the color     * @param b int The blue component of the color     * @return Color The color matching the given red, green and blue componet values     */    public static Color getColor(int r, int g, int b) {        return getColor(new RGB(r, g, b));    }    /**     * Returns a color given its RGB value     * @param rgb RGB The RGB value of the color     * @return Color The color matching the RGB value     */    public static Color getColor(RGB rgb) {        Color color = m_ColorMap.get(rgb);        if (color == null) {            Display display = Display.getCurrent();            color = new Color(display, rgb);            m_ColorMap.put(rgb, color);        }        return color;    }    /**     * Dispose of all the cached colors     */    public static void disposeColors() {        for (Iterator<Color> iter = m_ColorMap.values().iterator(); iter.hasNext();)             iter.next().dispose();        m_ColorMap.clear();    }    //////////////////////////////    // Image support    //////////////////////////////	/**	 * Maps image names to images	 */    private static HashMap<String, Image> m_ClassImageMap = new HashMap<String, Image>();	/**	 * Maps images to image decorators	 */    private static HashMap<Image, HashMap<Image, Image>> m_ImageToDecoratorMap = new HashMap<Image, HashMap<Image, Image>>();    /**     * Returns an image encoded by the specified input stream     * @param is InputStream The input stream encoding the image data     * @return Image The image encoded by the specified input stream     */    protected static Image getImage(InputStream is) {        Display display = Display.getCurrent();        ImageData data = new ImageData(is);        if (data.transparentPixel > 0)            return new Image(display, data, data.getTransparencyMask());        return new Image(display, data);    }    /**     * Returns an image stored in the file at the specified path     * @param path String The path to the image file     * @return Image The image stored in the file at the specified path     */    public static Image getImage(String path) {    	return getImage("default", path); //$NON-NLS-1$    }    /**     * Returns an image stored in the file at the specified path     * @param section The section to which belongs specified image     * @param path String The path to the image file     * @return Image The image stored in the file at the specified path     */    public static Image getImage(String section, String path) {        String key = section + '|' + SWTResourceManager.class.getName() + '|' + path;        Image image = m_ClassImageMap.get(key);        if (image == null) {            try {                FileInputStream fis = new FileInputStream(path);                image = getImage(fis);                m_ClassImageMap.put(key, image);                fis.close();            } catch (Exception e) {            	image = getMissingImage();            	m_ClassImageMap.put(key, image);            }        }        return image;    }    /**     * Returns an image stored in the file at the specified path relative to the specified class     * @param clazz Class The class relative to which to find the image     * @param path String The path to the image file     * @return Image The image stored in the file at the specified path     */    public static Image getImage(Class<?> clazz, String path) {        String key = clazz.getName() + '|' + path;        Image image = m_ClassImageMap.get(key);        if (image == null) {        	try {        		if (path.length() > 0 && path.charAt(0) == '/') {        			String newPath = path.substring(1, path.length());        			image = getImage(new BufferedInputStream(clazz.getClassLoader().getResourceAsStream(newPath)));        		} else {        			image = getImage(clazz.getResourceAsStream(path));        		}        		m_ClassImageMap.put(key, image);        	} catch (Exception e) {        		image = getMissingImage();        		m_ClassImageMap.put(key, image);        	}        }        return image;    }    private static final int MISSING_IMAGE_SIZE = 10;	private static Image getMissingImage() {		Image image = new Image(Display.getCurrent(), MISSING_IMAGE_SIZE, MISSING_IMAGE_SIZE);		//		GC gc = new GC(image);		gc.setBackground(getColor(SWT.COLOR_RED));		gc.fillRectangle(0, 0, MISSING_IMAGE_SIZE, MISSING_IMAGE_SIZE);		gc.dispose();		//		return image;	}    /**     * Style constant for placing decorator image in top left corner of base image.     */    public static final int TOP_LEFT = 1;    /**     * Style constant for placing decorator image in top right corner of base image.     */    public static final int TOP_RIGHT = 2;    /**     * Style constant for placing decorator image in bottom left corner of base image.     */    public static final int BOTTOM_LEFT = 3;    /**     * Style constant for placing decorator image in bottom right corner of base image.     */    public static final int BOTTOM_RIGHT = 4;        /**     * Returns an image composed of a base image decorated by another image     * @param baseImage Image The base image that should be decorated     * @param decorator Image The image to decorate the base image     * @return Image The resulting decorated image     */    public static Image decorateImage(Image baseImage, Image decorator) {    	return decorateImage(baseImage, decorator, BOTTOM_RIGHT);    }        /**	 * Returns an image composed of a base image decorated by another image	 * @param baseImage Image The base image that should be decorated	 * @param decorator Image The image to decorate the base image

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品国产成人国产三级粉色 | 精品一区二区日韩| 成人午夜电影小说| 日韩视频在线你懂得| 中文字幕一区在线观看| 极品少妇xxxx精品少妇| 欧美蜜桃一区二区三区| 亚洲天堂精品在线观看| 国产69精品久久99不卡| 日韩美女天天操| 亚洲成av人片一区二区| 色综合天天做天天爱| 久久久久久影视| 国产原创一区二区| 日韩精品中文字幕在线一区| 视频一区欧美精品| 欧美午夜电影在线播放| 亚洲综合丝袜美腿| 99精品黄色片免费大全| 国产精品视频在线看| 国产成人亚洲综合a∨婷婷图片| 日韩精品一区二区三区中文精品| 香蕉影视欧美成人| 欧美精品1区2区3区| 午夜欧美在线一二页| 欧美日韩国产免费| 偷拍与自拍一区| 91.成人天堂一区| 日韩在线一二三区| 777亚洲妇女| 久久机这里只有精品| 日韩一级片在线观看| 麻豆精品一区二区av白丝在线| 日韩欧美你懂的| 精品在线一区二区三区| 久久久夜色精品亚洲| 国产成人精品亚洲日本在线桃色 | 91精品综合久久久久久| 偷拍亚洲欧洲综合| 日韩精品资源二区在线| 国产在线视频精品一区| 国产清纯美女被跳蛋高潮一区二区久久w| 久久精品国产久精国产爱| 久久噜噜亚洲综合| 99久精品国产| 亚洲成人午夜电影| 精品久久久网站| 大桥未久av一区二区三区中文| 国产精品国产三级国产aⅴ原创 | 精品日韩av一区二区| 国产麻豆午夜三级精品| 国产精品二区一区二区aⅴ污介绍| 97精品电影院| 天天做天天摸天天爽国产一区| 日韩一本二本av| 国产精品一区二区黑丝| 中文字幕在线不卡一区二区三区 | 午夜电影一区二区| 精品福利一区二区三区免费视频| 成人午夜av在线| 亚洲成av人片一区二区梦乃| 日韩美女天天操| 色综合久久综合| 久久99蜜桃精品| 自拍视频在线观看一区二区| 制服.丝袜.亚洲.中文.综合 | 久久99蜜桃精品| 一区在线观看视频| 日韩三级免费观看| 91老师国产黑色丝袜在线| 美女性感视频久久| 亚洲欧洲日产国产综合网| 欧美一区二区三区四区高清| 成人a级免费电影| 日韩主播视频在线| 亚洲男人的天堂在线观看| 精品国产乱子伦一区| 91福利资源站| 成人福利视频在线| 狠狠网亚洲精品| 亚洲成人精品一区| 国产精品久久久久久久第一福利 | 综合色天天鬼久久鬼色| 欧美一区二区免费视频| 91亚洲精品久久久蜜桃网站| 精品无人码麻豆乱码1区2区| 亚洲福利一区二区| 亚洲三级视频在线观看| 久久久久久久久久久久电影| 在线不卡的av| 欧美日韩中文字幕一区二区| 不卡一二三区首页| 国产成人精品三级麻豆| 蜜桃视频一区二区三区在线观看| 亚洲综合偷拍欧美一区色| 国产精品人人做人人爽人人添| 日韩欧美激情四射| 日韩一区二区视频| 欧美日韩一级片在线观看| 91视频一区二区三区| 成人成人成人在线视频| 丁香亚洲综合激情啪啪综合| 国产麻豆成人精品| 国产精品综合二区| 国产一区二区三区日韩| 久久99精品久久久久久| 精品一二三四区| 久久国产精品99久久久久久老狼| 日韩av午夜在线观看| 天涯成人国产亚洲精品一区av| 亚洲在线视频网站| 午夜伊人狠狠久久| 五月天激情综合网| 蜜桃av噜噜一区| 久久成人免费网| 国产一区二区免费在线| 狠狠色丁香婷综合久久| 国产一区二区三区国产| 国产精品 日产精品 欧美精品| 国产精品综合二区| 成人做爰69片免费看网站| youjizz国产精品| 91在线国产福利| 欧美视频一区二区三区在线观看 | 日韩激情视频在线观看| 人妖欧美一区二区| 国产一区二区三区在线观看精品 | 国产一区二区三区久久悠悠色av| 国产一区二区三区在线观看精品| 国产69精品一区二区亚洲孕妇| 91在线码无精品| 欧美日韩国产中文| 欧美精品一区二| 国产精品国模大尺度视频| 一区二区三区美女| 日本一区中文字幕 | 国产精品国产三级国产| 一区二区三区自拍| 日韩高清不卡一区二区三区| 久久av中文字幕片| 99re这里都是精品| 欧美福利视频导航| 久久久91精品国产一区二区精品| 欧美国产1区2区| 亚洲不卡在线观看| 国产东北露脸精品视频| 日本道免费精品一区二区三区| 欧美一区二区女人| 综合欧美一区二区三区| 免费一级片91| 色综合天天狠狠| 精品久久一二三区| 亚洲一区二区三区激情| 国产精品99精品久久免费| 在线观看国产91| 久久久高清一区二区三区| 亚洲一区二区高清| 国产高清在线观看免费不卡| 欧美日韩一区三区四区| 欧美精彩视频一区二区三区| 首页国产丝袜综合| 99久久精品免费精品国产| 日韩一区二区视频在线观看| 亚洲免费大片在线观看| 国产经典欧美精品| 日韩一区二区三区三四区视频在线观看| 国产精品伦理一区二区| 精品一区二区三区视频在线观看| 91成人免费电影| 国产欧美日韩综合| 久久精品久久99精品久久| 欧美性生活一区| 亚洲欧洲色图综合| 国产成人丝袜美腿| 久久在线免费观看| 蜜臀99久久精品久久久久久软件| 欧美最新大片在线看| 中文字幕一区二区三区四区不卡| 国产在线不卡一区| 精品国产91乱码一区二区三区| 午夜欧美一区二区三区在线播放| 色综合天天天天做夜夜夜夜做| 精品国产百合女同互慰| 秋霞午夜鲁丝一区二区老狼| 色综合天天综合给合国产| 国产精品美女久久久久久 | 99re66热这里只有精品3直播| 久久久久久久久久久电影| 激情综合网av| 日韩精品最新网址| 麻豆91在线播放免费| 精品人在线二区三区| 麻豆精品久久久| 精品免费视频一区二区| 激情深爱一区二区| 亚洲精品在线免费播放| 国产精品综合一区二区| 久久久久久久综合日本| 成人在线一区二区三区| 中文字幕精品一区二区精品绿巨人|