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

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

?? imageloader.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.graphics;import java.io.*;import java.util.Vector;import org.eclipse.swt.*;import org.eclipse.swt.internal.Compatibility;import org.eclipse.swt.internal.image.*;/** * Instances of this class are used to load images from, * and save images to, a file or stream. * <p> * Currently supported image formats are: * </p><ul> * <li>BMP (Windows Bitmap)</li> * <li>ICO (Windows Icon)</li> * <li>JPEG</li> * <li>GIF</li> * <li>PNG</li> * </ul> * <code>ImageLoaders</code> can be used to: * <ul> * <li>load/save single images in all formats</li> * <li>load/save multiple images (GIF/ICO)</li> * <li>load/save animated GIF images</li> * <li>load interlaced GIF/PNG images</li> * <li>load progressive JPEG images</li> * </ul> */ public class ImageLoader {		/**	 * the array of ImageData objects in this ImageLoader.	 * This array is read in when the load method is called,	 * and it is written out when the save method is called	 */	public ImageData[] data;		/**	 * the width of the logical screen on which the images	 * reside, in pixels (this corresponds to the GIF89a	 * Logical Screen Width value)	 */	public int logicalScreenWidth;	/**	 * the height of the logical screen on which the images	 * reside, in pixels (this corresponds to the GIF89a	 * Logical Screen Height value)	 */	public int logicalScreenHeight;	/**	 * the background pixel for the logical screen (this 	 * corresponds to the GIF89a Background Color Index value).	 * The default is -1 which means 'unspecified background'	 * 	 */	public int backgroundPixel;	/**	 * the number of times to repeat the display of a sequence	 * of animated images (this corresponds to the commonly-used	 * GIF application extension for "NETSCAPE 2.0 01")	 */	public int repeatCount;			/*	 * the set of ImageLoader event listeners, created on demand	 */	Vector imageLoaderListeners;/** * Construct a new empty ImageLoader. */public ImageLoader() {	reset();}/** * Resets the fields of the ImageLoader, except for the * <code>imageLoaderListeners</code> field. */void reset() {	data = null;	logicalScreenWidth = 0;	logicalScreenHeight = 0;	backgroundPixel = -1;	repeatCount = 1;}/** * Loads an array of <code>ImageData</code> objects from the * specified input stream. Throws an error if either an error * occurs while loading the images, or if the images are not * of a supported type. Returns the loaded image data array. * * @param stream the input stream to load the images from * @return an array of <code>ImageData</code> objects loaded from the specified input stream * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li> *    <li>ERROR_IO - if an input/output error occurs while reading data</li> * </ul> */public ImageData[] load(InputStream stream) {	if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	reset();	data = FileFormat.load(stream, this);	return data;}/** * Loads an array of <code>ImageData</code> objects from the * file with the specified name. Throws an error if either * an error occurs while loading the images, or if the images are * not of a supported type. Returns the loaded image data array. * * @param filename the name of the file to load the images from * @return an array of <code>ImageData</code> objects loaded from the specified file * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li> *    <li>ERROR_IO - if an IO error occurs while reading data</li> * </ul> */public ImageData[] load(String filename) {	if (filename == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	InputStream stream = null;	try {		stream = Compatibility.newFileInputStream(filename);		return load(stream);	} catch (IOException e) {		SWT.error(SWT.ERROR_IO, e);	} finally {		try {			if (stream != null) stream.close();		} catch (IOException e) {			// Ignore error		}	}	return null;}/** * Saves the image data in this ImageLoader to the specified stream. * The format parameter can have one of the following values: * <dl> * <dt><code>IMAGE_BMP</code></dt> * <dd>Windows BMP file format, no compression</dd> * <dt><code>IMAGE_BMP_RLE</code></dt> * <dd>Windows BMP file format, RLE compression if appropriate</dd> * <dt><code>IMAGE_GIF</code></dt> * <dd>GIF file format</dd> * <dt><code>IMAGE_ICO</code></dt> * <dd>Windows ICO file format</dd> * <dt><code>IMAGE_JPEG</code></dt> * <dd>JPEG file format</dd> * <dt><code>IMAGE_PNG</code></dt> * <dd>PNG file format</dd> * </dl> * * @param stream the output stream to write the images to * @param format the format to write the images in * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE if the image data contains invalid data</li> *    <li>ERROR_IO if an IO error occurs while writing to the stream</li> * </ul> */public void save(OutputStream stream, int format) {	if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	FileFormat.save(stream, format, this);}/** * Saves the image data in this ImageLoader to a file with the specified name. * The format parameter can have one of the following values: * <dl> * <dt><code>IMAGE_BMP</code></dt> * <dd>Windows BMP file format, no compression</dd> * <dt><code>IMAGE_BMP_RLE</code></dt> * <dd>Windows BMP file format, RLE compression if appropriate</dd> * <dt><code>IMAGE_GIF</code></dt> * <dd>GIF file format</dd> * <dt><code>IMAGE_ICO</code></dt> * <dd>Windows ICO file format</dd> * <dt><code>IMAGE_JPEG</code></dt> * <dd>JPEG file format</dd> * <dt><code>IMAGE_PNG</code></dt> * <dd>PNG file format</dd> * </dl> * * @param filename the name of the file to write the images to * @param format the format to write the images in * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE if the image data contains invalid data</li> *    <li>ERROR_IO if an IO error occurs while writing to the file</li> * </ul> */public void save(String filename, int format) {	if (filename == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	OutputStream stream = null;	try {		stream = Compatibility.newFileOutputStream(filename);	} catch (IOException e) {		SWT.error(SWT.ERROR_IO, e);	}	save(stream, format);}/**	  * Adds a listener to receive image loader events. * <p> * An ImageLoaderListener should be added before invoking * one of the receiver's load methods. The listener's  * <code>imageDataLoaded</code> method is called when image * data has been partially loaded, as is supported by interlaced * GIF/PNG or progressive JPEG images. * * @param listener the ImageLoaderListener to add * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> *  * @see ImageLoaderListener * @see ImageLoaderEvent */public void addImageLoaderListener(ImageLoaderListener listener) {	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (imageLoaderListeners == null) {		imageLoaderListeners = new Vector();	}	imageLoaderListeners.addElement(listener);}/**	  * Removes a listener that was receiving image loader events. * * @param listener the ImageLoaderListener to remove * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> *  * @see #addImageLoaderListener(ImageLoaderListener) */public void removeImageLoaderListener(ImageLoaderListener listener) {	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (imageLoaderListeners == null) return;	imageLoaderListeners.removeElement(listener);}/**	  * Returns <code>true</code> if the receiver has image loader * listeners, and <code>false</code> otherwise. * * @return <code>true</code> if there are <code>ImageLoaderListener</code>s, and <code>false</code> otherwise * * @see #addImageLoaderListener(ImageLoaderListener) * @see #removeImageLoaderListener(ImageLoaderListener) */public boolean hasListeners() {	return imageLoaderListeners != null && imageLoaderListeners.size() > 0;}/**	  * Notifies all image loader listeners that an image loader event * has occurred. Pass the specified event object to each listener. * * @param event the <code>ImageLoaderEvent</code> to send to each <code>ImageLoaderListener</code> */public void notifyListeners(ImageLoaderEvent event) {	if (!hasListeners()) return;	int size = imageLoaderListeners.size();	for (int i = 0; i < size; i++) {		ImageLoaderListener listener = (ImageLoaderListener) imageLoaderListeners.elementAt(i);		listener.imageDataLoaded(event);	}}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av激情亚洲男人天堂| 国产精品一区二区三区四区| 欧美高清在线一区| 中文字幕精品一区| 日本一区二区三区在线观看| 久久一区二区三区四区| 久久久亚洲精品一区二区三区 | 中文天堂在线一区| 久久精品亚洲精品国产欧美| 久久亚洲精品小早川怜子| 久久精品亚洲国产奇米99| 中国av一区二区三区| 1区2区3区国产精品| 亚洲男同性视频| 亚洲成av人**亚洲成av**| 亚洲成人你懂的| 久久福利资源站| 成人精品国产一区二区4080| yourporn久久国产精品| 在线观看亚洲一区| 日韩免费成人网| 国产精品伦理在线| 亚洲丰满少妇videoshd| 国内精品嫩模私拍在线| 国产成人精品www牛牛影视| 色综合久久久久久久久| 欧美一区二区三区四区久久| 久久久噜噜噜久久中文字幕色伊伊 | 久久久不卡影院| 国产精品国产自产拍高清av| 亚洲一二三专区| 久久爱另类一区二区小说| 成人在线一区二区三区| 欧美色中文字幕| 精品不卡在线视频| 亚洲天堂精品在线观看| 日本美女一区二区三区| 成人综合婷婷国产精品久久 | 日韩伦理电影网| 日韩精品一级二级| 成人app下载| 欧美本精品男人aⅴ天堂| 亚洲天堂福利av| 国内精品久久久久影院薰衣草| 91亚洲国产成人精品一区二区三| 欧美三级乱人伦电影| 国产精品美女久久久久久| 天天影视网天天综合色在线播放| 国产成人免费xxxxxxxx| 欧美久久久久久久久中文字幕| 久久久91精品国产一区二区精品| 亚洲五码中文字幕| eeuss鲁片一区二区三区| 日韩一二三四区| 亚洲精品午夜久久久| 高清不卡在线观看| 欧美一区二区大片| 亚洲五月六月丁香激情| 91视频观看免费| 国产午夜亚洲精品理论片色戒| 日本亚洲视频在线| 欧美酷刑日本凌虐凌虐| 国产精品白丝在线| 国产成人精品www牛牛影视| 精品日韩欧美在线| 日韩电影在线观看一区| 欧美日韩精品欧美日韩精品一| 国产精品久久久久影院亚瑟| 极品瑜伽女神91| 日韩亚洲欧美一区二区三区| 亚洲一区二区黄色| 欧美丝袜丝nylons| 一区二区三区色| 色婷婷综合久久久中文一区二区 | 欧美成人一区二区三区| 亚洲一区电影777| 在线观看成人免费视频| 一区二区在线免费观看| 欧美综合在线视频| 亚洲国产精品久久艾草纯爱 | 精品无人区卡一卡二卡三乱码免费卡 | 国产精品丝袜一区| 成人黄色电影在线| 18成人在线观看| 91黄视频在线| 午夜伊人狠狠久久| 777欧美精品| 免费人成在线不卡| 久久久99精品免费观看| 成人精品视频一区二区三区尤物| 国产精品国产三级国产aⅴ无密码| 91麻豆国产香蕉久久精品| 亚洲日本一区二区| 欧美日韩国产另类一区| 麻豆成人av在线| 欧美激情艳妇裸体舞| 91女神在线视频| 亚洲.国产.中文慕字在线| 91精品综合久久久久久| 极品美女销魂一区二区三区免费| 精品欧美一区二区久久| 成人午夜短视频| 亚洲午夜在线电影| www国产亚洲精品久久麻豆| 成人免费视频视频| 五月婷婷激情综合| 国产欧美一二三区| 911精品国产一区二区在线| 国产一区二区精品在线观看| 亚洲激情五月婷婷| 久久一区二区三区四区| 91精品1区2区| 韩国欧美国产1区| 亚洲精品欧美专区| 2014亚洲片线观看视频免费| 99久久综合国产精品| 日韩国产高清在线| 中文字幕一区二区在线观看| 欧美疯狂性受xxxxx喷水图片| 国产美女一区二区| 亚洲图片欧美色图| 欧美国产亚洲另类动漫| 555夜色666亚洲国产免| 成人免费毛片嘿嘿连载视频| 亚洲成av人片一区二区三区| 日本一区二区成人| 日韩亚洲国产中文字幕欧美| 99久久99久久综合| 国产一区二区在线视频| 午夜一区二区三区在线观看| 国产精品免费视频观看| 欧美精品一区二区久久久| 欧美日韩视频在线一区二区| 粉嫩aⅴ一区二区三区四区五区| 日本在线播放一区二区三区| 亚洲欧美色一区| 久久久久久久国产精品影院| 欧美精三区欧美精三区| 色综合咪咪久久| 成人福利在线看| 极品少妇xxxx精品少妇偷拍| 性做久久久久久免费观看| 国产精品久久久久影院老司| 亚洲精品在线一区二区| 欧美精品vⅰdeose4hd| 91麻豆蜜桃一区二区三区| 国产福利一区二区三区视频| 麻豆国产91在线播放| 日韩精品电影在线| 一区二区三区四区五区视频在线观看| 精品处破学生在线二十三| 日韩亚洲欧美高清| 日韩免费在线观看| 日韩久久久精品| 日韩一区二区高清| 日韩一级大片在线观看| 欧美一区二区三区人| 欧美日韩高清一区二区不卡| 6080日韩午夜伦伦午夜伦| 欧美日韩一区二区欧美激情| 欧美猛男gaygay网站| 在线不卡一区二区| 欧美一区二区二区| 久久网站最新地址| 欧美国产一区视频在线观看| 国产精品日韩精品欧美在线 | 欧美亚洲国产怡红院影院| 欧美日韩日日摸| 欧美一区二区三区爱爱| 日韩一区二区三区高清免费看看| 日韩精品一区二区三区视频在线观看| 日韩免费高清av| 国产欧美一二三区| 国产精品三级在线观看| 亚洲色图丝袜美腿| 亚洲国产精品久久人人爱| 日本欧美一区二区| 国产精品一区二区x88av| 成人三级在线视频| 在线视频欧美精品| 日韩欧美中文一区二区| 精品国产成人系列| 亚洲欧美日韩在线播放| 亚洲1区2区3区4区| 精品夜夜嗨av一区二区三区| 99视频精品在线| 欧美色图免费看| 久久久国际精品| 一区二区三区精品久久久| 日本不卡高清视频| 成人av在线看| 91精品国产91久久综合桃花| 国产视频视频一区| 亚洲在线观看免费视频| 麻豆国产精品777777在线| 99精品视频免费在线观看| 正在播放一区二区| 综合久久久久久| 久久精工是国产品牌吗| 欧美中文字幕一区|