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

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

?? swtresourcemanager.java

?? 自動售貨機
?? 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.swt.SWT;import org.eclipse.swt.graphics.Color;import org.eclipse.swt.graphics.Cursor;import org.eclipse.swt.graphics.Font;import org.eclipse.swt.graphics.FontData;import org.eclipse.swt.graphics.GC;import org.eclipse.swt.graphics.Image;import org.eclipse.swt.graphics.ImageData;import org.eclipse.swt.graphics.Point;import org.eclipse.swt.graphics.RGB;import org.eclipse.swt.graphics.Rectangle;import org.eclipse.swt.widgets.Canvas;import org.eclipse.swt.widgets.Control;import org.eclipse.swt.widgets.CoolBar;import org.eclipse.swt.widgets.CoolItem;import org.eclipse.swt.widgets.Display;/** * 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     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91啪亚洲精品| 精品国精品自拍自在线| 欧美日韩免费高清一区色橹橹 | 日韩午夜精品视频| 日本一区二区高清| 亚洲第一成人在线| av亚洲精华国产精华| 欧美一区二区视频在线观看| 国产精品久久夜| 韩国女主播成人在线| 欧美日韩久久久久久| 亚洲精品大片www| 不卡视频在线观看| www国产成人免费观看视频 深夜成人网 | 在线一区二区三区四区五区 | 精品免费日韩av| 午夜a成v人精品| 91视频精品在这里| 国产精品久久久久一区| 国产电影精品久久禁18| 精品国产乱码久久久久久1区2区 | 成人午夜av影视| 精品国产一区二区在线观看| 婷婷激情综合网| 欧美日韩一本到| 亚洲综合小说图片| 欧洲一区在线电影| 亚洲免费av网站| 91首页免费视频| 亚洲乱码国产乱码精品精可以看| 成人国产一区二区三区精品| 国产亚洲自拍一区| 国产精品一区二区你懂的| 欧美成人video| 狠狠色丁香久久婷婷综合丁香| 日韩视频免费观看高清完整版在线观看 | 国产精品欧美久久久久一区二区| 国产丶欧美丶日本不卡视频| 国产亚洲人成网站| 国产成人夜色高潮福利影视| 欧美韩日一区二区三区| 粉嫩嫩av羞羞动漫久久久| 国产精品欧美一区喷水| 99久久综合精品| 一卡二卡欧美日韩| 欧美日韩一区二区欧美激情| 午夜av电影一区| 日韩欧美国产1| 国产精品456| 亚洲精品日产精品乱码不卡| 欧美制服丝袜第一页| 日韩精品成人一区二区在线| 欧美tickle裸体挠脚心vk| 国产麻豆9l精品三级站| 亚洲国产岛国毛片在线| 色婷婷综合久色| 久久精品国内一区二区三区| 亚洲国产精品二十页| 欧美专区亚洲专区| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩精品一区二区三区swag| jizz一区二区| 日韩va亚洲va欧美va久久| 久久久久国产免费免费| 色哟哟在线观看一区二区三区| 日日摸夜夜添夜夜添国产精品| 久久先锋影音av鲁色资源网| 91美女片黄在线观看| 青青草97国产精品免费观看| 国产精品伦理一区二区| 欧美理论片在线| 国产不卡高清在线观看视频| 亚洲大尺度视频在线观看| 精品sm在线观看| 欧洲日韩一区二区三区| 国产一区二区三区高清播放| 亚洲激情图片一区| 久久丝袜美腿综合| 欧美在线观看一区二区| 国产精品影视天天线| 亚洲国产精品自拍| 国产精品国产自产拍高清av王其 | 久久超碰97人人做人人爱| 亚洲日本丝袜连裤袜办公室| 精品日产卡一卡二卡麻豆| 91久久免费观看| 国产成人精品一区二区三区四区 | 美脚の诱脚舐め脚责91| 夜夜揉揉日日人人青青一国产精品| 亚洲精品欧美激情| 91精品国产综合久久婷婷香蕉 | 亚洲精品久久嫩草网站秘色| 精品999在线播放| 欧美人牲a欧美精品| 97久久精品人人做人人爽| 国产一区二区精品久久99| 日韩精品免费专区| 夜夜精品视频一区二区| 中文字幕在线观看一区| 国产亚洲精品中文字幕| 欧美成人精品二区三区99精品| 精品污污网站免费看| 91麻豆自制传媒国产之光| 国产99久久久精品| 国产精品18久久久| 精品一区二区免费在线观看| 日韩高清不卡一区二区| 亚洲大型综合色站| 亚洲电影第三页| 亚洲成av人片一区二区梦乃| 亚洲国产视频网站| 一区二区三区四区不卡在线 | 日韩高清一区二区| 亚洲国产精品麻豆| 亚洲国产精品综合小说图片区| 一区二区三区四区乱视频| 亚洲精品乱码久久久久久| 一区二区三区在线播放| 一区二区三区四区av| 亚洲国产人成综合网站| 五月天婷婷综合| 青青草91视频| 激情欧美一区二区三区在线观看| 免费成人在线观看视频| 蜜桃视频一区二区| 国产一区二区三区香蕉| 国产成人自拍网| 成年人网站91| 日本丶国产丶欧美色综合| 欧美精品第1页| 精品播放一区二区| 中文字幕欧美一| 一区二区三区在线观看网站| 日日摸夜夜添夜夜添亚洲女人| 日韩电影在线一区二区| 精品中文av资源站在线观看| 精品在线一区二区三区| 成人av在线播放网址| 日本韩国欧美一区二区三区| 欧美日韩高清一区| 久久看人人爽人人| 国产精品免费视频一区| 一区二区视频免费在线观看| 日韩成人一级片| 91精品福利在线一区二区三区 | 欧美日本不卡视频| 26uuu精品一区二区三区四区在线| 国产日产精品1区| 亚洲精品视频在线观看免费| 日本在线不卡视频一二三区| 国产传媒欧美日韩成人| 色女孩综合影院| 日韩三级在线观看| 中文字幕中文字幕一区| 日韩国产精品久久久久久亚洲| 国产精品资源网| 欧美图片一区二区三区| 久久久国产精华| 亚洲电影视频在线| 成人久久18免费网站麻豆 | 久久色.com| 亚洲国产欧美在线人成| 成人午夜伦理影院| 欧美人动与zoxxxx乱| 国产精品久久久久四虎| 久久国产精品露脸对白| 欧美唯美清纯偷拍| 中文字幕中文在线不卡住| 久久激五月天综合精品| 在线亚洲一区观看| 国产午夜精品美女毛片视频| 亚洲.国产.中文慕字在线| 成人av在线看| 精品国产91乱码一区二区三区 | 欧美人牲a欧美精品| 亚洲欧美偷拍三级| 丁香五精品蜜臀久久久久99网站| 777色狠狠一区二区三区| 国产精品一级片| 欧美一级精品在线| 亚洲午夜精品久久久久久久久| heyzo一本久久综合| 国产日韩亚洲欧美综合| 狠狠色丁香婷婷综合| 日韩一二三四区| 亚洲网友自拍偷拍| 在线观看中文字幕不卡| 国产精品久久久久影院色老大| 国产精品一区二区在线播放 | 日韩精品一区二区三区swag| 日韩中文欧美在线| 精品视频1区2区3区| 亚洲精品乱码久久久久| 日本高清不卡视频| 亚洲激情校园春色| 欧美在线观看视频一区二区| 亚洲女性喷水在线观看一区| av亚洲精华国产精华精华 | 亚洲成a人片综合在线| 在线看不卡av|