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

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

?? clipboard.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* * 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.dnd;import org.eclipse.swt.*;import org.eclipse.swt.widgets.*;import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.internal.ole.win32.*;/** * The <code>Clipboard</code> provides a mechanism for transferring data from one * application to another or within an application. *  * <p>IMPORTANT: This class is <em>not</em> intended to be subclassed.</p> */public class Clipboard {	private Display display;		// ole interfaces	private COMObject iDataObject;	private int refCount;	private Transfer[] transferAgents = new Transfer[0];	private Object[] data = new Object[0];	private int CFSTR_PREFERREDDROPEFFECT;/** * Constructs a new instance of this class.  Creating an instance of a Clipboard * may cause system resources to be allocated depending on the platform.  It is therefore * mandatory that the Clipboard instance be disposed when no longer required. * * @param display the display on which to allocate the clipboard * * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> * * @see Clipboard#dispose * @see Clipboard#checkSubclass */public Clipboard(Display display) {		checkSubclass ();	if (display == null) {		display = Display.getCurrent();		if (display == null) {			display = Display.getDefault();		}	}	if (display.getThread() != Thread.currentThread()) {		DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);	}	this.display = display;	TCHAR chFormatName = new TCHAR(0, "Preferred DropEffect", true); //$NON-NLS-1$	CFSTR_PREFERREDDROPEFFECT = COM.RegisterClipboardFormat(chFormatName);	createCOMInterfaces();	this.AddRef();}/** * Checks that this class can be subclassed. * <p> * The SWT class library is intended to be subclassed  * only at specific, controlled points. This method enforces this * rule unless it is overridden. * </p><p> * <em>IMPORTANT:</em> By providing an implementation of this * method that allows a subclass of a class which does not  * normally allow subclassing to be created, the implementer * agrees to be fully responsible for the fact that any such * subclass will likely fail between SWT releases and will be * strongly platform specific. No support is provided for * user-written classes which are implemented in this fashion. * </p><p> * The ability to subclass outside of the allowed SWT classes * is intended purely to enable those not on the SWT development * team to implement patches in order to get around specific * limitations in advance of when those limitations can be * addressed by the team. Subclassing should not be attempted * without an intimate and detailed understanding of the hierarchy. * </p> * * @exception SWTException <ul> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> */protected void checkSubclass () {	String name = getClass().getName ();	String validName = Clipboard.class.getName();	if (!validName.equals(name)) {		DND.error (SWT.ERROR_INVALID_SUBCLASS);	}}/** * Throws an <code>SWTException</code> if the receiver can not * be accessed by the caller. This may include both checks on * the state of the receiver and more generally on the entire * execution context. This method <em>should</em> be called by * widget implementors to enforce the standard SWT invariants. * <p> * Currently, it is an error to invoke any method (other than * <code>isDisposed()</code>) on a widget that has had its  * <code>dispose()</code> method called. It is also an error * to call widget methods from any thread that is different * from the thread that created the widget. * </p><p> * In future releases of SWT, there may be more or fewer error * checks and exceptions may be thrown for different reasons. * </p> * * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */protected void checkWidget () {	Display display = this.display;	if (display == null) DND.error (SWT.ERROR_WIDGET_DISPOSED);	if (display.getThread() != Thread.currentThread ()) DND.error (SWT.ERROR_THREAD_INVALID_ACCESS);	if (display.isDisposed()) DND.error(SWT.ERROR_WIDGET_DISPOSED);}/** * Disposes of the operating system resources associated with the clipboard.  * The data will still be available on the system clipboard after the dispose  * method is called.   *  * <p>NOTE: On some platforms the data will not be available once the application * has exited or the display has been disposed.</p> *  * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */public void dispose () {	if (isDisposed()) return;	if (display.getThread() != Thread.currentThread()) DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);	if (COM.OleIsCurrentClipboard(this.iDataObject.getAddress()) == COM.S_OK) {		COM.OleFlushClipboard();	}		this.Release();	display = null;}/** * Retrieve the data of the specified type currently available on the system clipboard.  Refer to the  * specific subclass of <code>Tramsfer</code> to determine the type of object returned. *  * <p>The following snippet shows text and RTF text being retrieved from the clipboard:</p> *  *    <code><pre> *    Clipboard clipboard = new Clipboard(display); *    TextTransfer textTransfer = TextTransfer.getInstance(); *    String textData = (String)clipboard.getContents(textTransfer); *    if (textData != null) System.out.println("Text is "+textData); *    RTFTransfer rtfTransfer = RTFTransfer.getInstance(); *    String rtfData = (String)clipboard.getContents(rtfTransfer); *    if (rtfData != null) System.out.println("RTF Text is "+rtfData); *    clipboard.dispose(); *    </code></pre> *  * @see Transfer *  * @param transfer the transfer agent for the type of data being requested *  * @return the data obtained from the clipboard or null if no data of this type is available *  * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if transfer is null</li> * </ul> */public Object getContents(Transfer transfer) {	checkWidget();	if (transfer == null) DND.error(SWT.ERROR_NULL_ARGUMENT);	/*	* Bug in Windows. When a new application takes control	* of the clipboard, other applications may open the 	* clipboard to determine if they want to record the 	* clipoard updates.  When this happens, the clipboard 	* can not be accessed until the other application is	* finished.  To allow the other applications to release	* the clipboard, use PeekMessage() to enable cross thread	* message sends.	*/	int[] ppv = new int[1];	int retryCount = 0;	int result = COM.OleGetClipboard(ppv);	while (result != COM.S_OK && retryCount++ < 10) {		try { Thread.sleep(50);} catch (Throwable t) {}		MSG msg = new MSG();		COM.PeekMessage (msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD);		result = COM.OleGetClipboard(ppv);	}	if (result != COM.S_OK) return null;	IDataObject dataObject = new IDataObject(ppv[0]);	try {		TransferData[] allowed = transfer.getSupportedTypes();		for (int i = 0; i < allowed.length; i++) {			if (dataObject.QueryGetData(allowed[i].formatetc) == COM.S_OK) {				TransferData data = allowed[i];				data.pIDataObject = ppv[0];				return transfer.nativeToJava(data);			}		}			} finally {		dataObject.Release();	}	return null; // No data available for this transfer}/** * Returns <code>true</code> if the clipboard has been disposed, * and <code>false</code> otherwise. * <p> * This method gets the dispose state for the clipboard. * When a clipboard has been disposed, it is an error to * invoke any other method using the clipboard. * </p> * * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise *  * @since 3.0 */public boolean isDisposed () {	return (display == null);}/** * Place data of the specified type on the system clipboard.  More than one type of * data can be placed on the system clipboard at the same time.  Setting the data  * clears any previous data of the same type from the system clipboard and also * clears data of any other type currently on the system clipboard. *  * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request.  As a result, if the  * application modifes the data object it has set on the clipboard, that modification  * may or may not be available when the data is subsequently requested.</p> * * <p>The following snippet shows text and RTF text being set on the clipboard:</p> *  * <code><pre> * 	Clipboard clipboard = new Clipboard(display); *		String textData = "Hello World"; *		String rtfData = "{\\rtf1\\b\\i Hello World}"; *		TextTransfer textTransfer = TextTransfer.getInstance(); *		RTFTransfer rtfTransfer = RTFTransfer.getInstance(); *		clipboard.setContents(new Object[]{textData, rtfData}, new Transfer[]{textTransfer, rtfTransfer}); *		clipboard.dispose(); * </code></pre> * * @param data the data to be set in the clipboard * @param dataTypes the transfer agents that will convert the data to its platform  * specific format; each entry in the data array must have a corresponding dataType *  * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if data is null or datatypes is null  *          or the length of data is not the same as the length of dataTypes</li> *   </ul> *  @exception SWTError <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> *    <li>ERROR_CANNOT_SET_CLIPBOARD - if the clipboard is locked or otherwise unavailable</li>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲女人的天堂| 中文字幕av一区二区三区免费看 | 91麻豆国产福利在线观看| 黄色成人免费在线| 国产揄拍国内精品对白| 国产一区二区三区精品视频| 国产成人夜色高潮福利影视| 成人国产精品免费观看动漫| 国产91对白在线观看九色| av亚洲产国偷v产偷v自拍| 97久久精品人人爽人人爽蜜臀| 99re在线视频这里只有精品| 色综合久久久久综合| 欧美日韩一区二区三区四区| 91精品国产综合久久婷婷香蕉| 日韩欧美一区二区免费| 久久综合色婷婷| 亚洲欧美日韩国产手机在线 | 欧美日韩亚州综合| 日韩视频中午一区| 中文字幕不卡一区| 三级一区在线视频先锋 | 亚洲一区二区精品久久av| 香蕉久久一区二区不卡无毒影院| 美女看a上一区| aaa国产一区| 在线观看91精品国产麻豆| 国产拍揄自揄精品视频麻豆| 一区二区三区在线视频观看| 久久国产麻豆精品| 91免费版在线看| 精品国产sm最大网站免费看 | 欧美三区免费完整视频在线观看| 欧美一级电影网站| 国产精品卡一卡二| 美腿丝袜在线亚洲一区| 91一区二区在线| 欧美精品一区二区三区很污很色的 | 欧美日韩一区三区| 2023国产精品| 舔着乳尖日韩一区| 成人av高清在线| 欧美成人国产一区二区| 一区二区三区成人| 国产91色综合久久免费分享| 555www色欧美视频| 亚洲精品日韩专区silk | 亚洲伦理在线免费看| 国产一区二区日韩精品| 欧美色综合天天久久综合精品| 国产精品视频免费| 精品一区二区三区久久久| 欧美三级在线播放| 亚洲人一二三区| 成人亚洲精品久久久久软件| 日韩欧美www| 国产精品一区久久久久| 欧美日韩国产bt| 亚洲一区二区三区中文字幕在线| 成人一区在线看| 久久网站热最新地址| 久久精品国产99国产| 91精品国产91久久久久久一区二区| 亚洲最大的成人av| 欧洲日韩一区二区三区| 亚洲福利一区二区| 91美女福利视频| 国产精品久久久久久一区二区三区| 国产一区二区精品在线观看| 亚洲精品一区二区三区四区高清| 日韩不卡手机在线v区| 91精品国产91久久久久久一区二区 | 在线观看成人免费视频| 亚洲卡通动漫在线| 日本韩国精品在线| 亚洲国产精品久久一线不卡| 欧美性色黄大片| 天天操天天综合网| 日韩一区二区电影| 国产在线播精品第三| 国产亚洲欧洲997久久综合| 丰满岳乱妇一区二区三区| 欧美激情一区二区在线| 一本一道波多野结衣一区二区| 亚洲同性gay激情无套| 欧美在线一二三| 香蕉乱码成人久久天堂爱免费| 日韩一区二区免费在线观看| 久久99精品国产| 国产精品三级av| 欧美日韩国产色站一区二区三区| 一区二区三区精密机械公司| 91精品欧美一区二区三区综合在 | 欧美国产精品一区二区三区| 丰满亚洲少妇av| 亚洲国产成人va在线观看天堂| 3d成人动漫网站| 色婷婷久久久综合中文字幕| 亚洲18色成人| 精品久久久久久久久久久院品网| 成人av资源在线观看| 亚洲国产日韩在线一区模特| 精品国产一区二区三区忘忧草| 成人亚洲一区二区一| 五月激情六月综合| 欧美国产一区视频在线观看| 欧美日韩国产影片| 成人一区二区三区视频在线观看 | 中文字幕不卡在线| 精品视频在线免费看| 狠狠色丁香久久婷婷综| 依依成人精品视频| 26uuu亚洲综合色欧美| 色哟哟日韩精品| 国产一区二区精品久久| 亚洲高清视频中文字幕| 久久精品在这里| 91精品国产综合久久久久久漫画| 成人免费毛片高清视频| 免费三级欧美电影| 一二三区精品视频| 中文字幕成人在线观看| 精品国产一二三| 欧美日韩免费一区二区三区| 国产精品 日产精品 欧美精品| 亚洲第一激情av| 亚洲欧洲日韩综合一区二区| 欧美大片日本大片免费观看| 91在线porny国产在线看| 国产美女在线观看一区| 美女视频黄 久久| 日韩和欧美一区二区三区| 亚洲毛片av在线| 一区二区中文视频| 国产精品免费av| 日本一区二区三级电影在线观看 | 国产精品久久久久久亚洲毛片| 欧美一区二区在线视频| 欧美影片第一页| 一本色道久久综合狠狠躁的推荐| 成人免费高清在线| 国产99久久久国产精品潘金| 国产尤物一区二区| 国产精品一二三四| 精品亚洲国产成人av制服丝袜| 青青草伊人久久| 美女脱光内衣内裤视频久久网站 | 亚洲伊人色欲综合网| 综合欧美一区二区三区| 中文字幕一区二区三区在线播放| 日本一区二区三区在线不卡| 国产日韩欧美在线一区| 欧美国产日韩亚洲一区| 国产欧美一区二区在线| 中文字幕乱码亚洲精品一区 | 欧美变态tickle挠乳网站| 欧美一区二区免费观在线| 日韩三级电影网址| 欧美成人伊人久久综合网| 26uuu国产一区二区三区| 国产视频一区二区在线| 国产精品视频yy9299一区| 亚洲婷婷综合色高清在线| 一区二区三区四区视频精品免费 | 成人免费毛片嘿嘿连载视频| 国产成人av电影在线| 成人激情动漫在线观看| 色婷婷av一区二区三区大白胸| 欧美吞精做爰啪啪高潮| 日韩午夜中文字幕| 久久久亚洲国产美女国产盗摄| 中文字幕va一区二区三区| 亚洲精品视频在线看| 日韩av在线播放中文字幕| 国产精品综合视频| 99久久国产免费看| 欧美日韩mp4| 国产午夜精品美女毛片视频| 亚洲精品乱码久久久久久黑人 | 日韩电影免费一区| 国产毛片精品一区| 日本韩国欧美一区| 精品国偷自产国产一区| 亚洲欧洲韩国日本视频| 日韩精品国产欧美| www.欧美.com| 日韩欧美电影一二三| 国产精品系列在线| 奇米888四色在线精品| 不卡在线观看av| 日韩午夜电影av| 亚洲欧美视频在线观看| 激情文学综合网| 91成人免费电影| 国产亚洲午夜高清国产拍精品| 亚洲国产va精品久久久不卡综合| 国内精品伊人久久久久av一坑| 欧美性xxxxxxxx| 国产精品免费久久| 久久超碰97中文字幕|