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

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

?? swt_awt.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具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.awt;import java.lang.reflect.Constructor;import java.lang.reflect.Field;import java.lang.reflect.Method;/* SWT Imports */import org.eclipse.swt.*;import org.eclipse.swt.graphics.Rectangle;import org.eclipse.swt.widgets.Shell;import org.eclipse.swt.widgets.Composite;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Listener;import org.eclipse.swt.widgets.Event;import org.eclipse.swt.internal.Library;/* AWT Imports */import java.awt.EventQueue;import java.awt.Canvas;import java.awt.Frame;import java.awt.Dimension;import java.awt.Toolkit;import java.awt.event.ComponentAdapter;import java.awt.event.ComponentEvent;import java.awt.event.WindowEvent;import java.awt.event.FocusEvent;/** * This class provides a bridge between SWT and AWT, so that it * is possible to embedded AWT components in SWT and vice versa. *  * @since 3.0 */public class SWT_AWT {	/**	 * The name of the embedded Frame class. The default class name	 * for the platform will be used if <code>null</code>. 	 */	public static String embeddedFrameClass;	static final boolean JDK1_3;	static boolean loaded, swingInitialized;	static Object menuSelectionManager;	static Method clearSelectionPath;static {	JDK1_3 = "1.3".equals(System.getProperty("java.specification.version"));}static native final int getAWTHandle (Canvas canvas);static synchronized void loadLibrary () {	if (loaded) return;	loaded = true;	Toolkit.getDefaultToolkit();	System.loadLibrary("jawt");	Library.loadLibrary("swt-awt");}static synchronized void initializeSwing() {	if (swingInitialized) return;	swingInitialized = true;	try {		/* Initialize the default focus traversal policy */		Class[] emptyClass = new Class[0];		Object[] emptyObject = new Object[0];		Class clazz = Class.forName("javax.swing.UIManager");		Method method = clazz.getMethod("getDefaults", emptyClass);		if (method != null) method.invoke(clazz, emptyObject);		/* Get the swing menu selection manager to dismiss swing popups properly */		clazz = Class.forName("javax.swing.MenuSelectionManager");		method = clazz.getMethod("defaultManager", emptyClass);		if (method == null) return;		menuSelectionManager = method.invoke(clazz, emptyObject);		if (menuSelectionManager == null) return;		clearSelectionPath = menuSelectionManager.getClass().getMethod("clearSelectedPath", emptyClass);	} catch (Throwable e) {}}/** * Creates a new <code>java.awt.Frame</code>. This frame is the root for * the AWT components that will be embedded within the composite. In order * for the embedding to succeed, the composite must have been created * with the SWT.EMBEDDED style. * <p> * IMPORTANT: As of JDK1.5, the embedded frame does not receive mouse events. * When a lightweight component is added as a child of the embedded frame, * the cursor does not change. In order to work around both these problems, it is * strongly recommended that a heavyweight component such as <code>java.awt.Panel</code> * be added to the frame as the root of all components. * </p> *  * @param parent the parent <code>Composite</code> of the new <code>java.awt.Frame</code> * @return a <code>java.awt.Frame</code> to be the parent of the embedded AWT components *  * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> *    <li>ERROR_INVALID_ARGUMENT - if the parent Composite does not have the SWT.EMBEDDED style</li>  * </ul> *  * @since 3.0 */public static Frame new_Frame (final Composite parent) {	if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if ((parent.getStyle () & SWT.EMBEDDED) == 0) {		SWT.error (SWT.ERROR_INVALID_ARGUMENT);	}	int handle = parent.handle;	/*	 * Some JREs have implemented the embedded frame constructor to take an integer	 * and other JREs take a long.  To handle this binary incompatability, use	 * reflection to create the embedded frame.	 */	Class clazz = null;	try {		String className = embeddedFrameClass != null ? embeddedFrameClass : "sun.awt.windows.WEmbeddedFrame";		clazz = Class.forName(className);	} catch (Throwable e) {		SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);			}	Constructor constructor = null;	try {		constructor = clazz.getConstructor (new Class [] {int.class});	} catch (Throwable e1) {		try {			constructor = clazz.getConstructor (new Class [] {long.class});		} catch (Throwable e2) {			SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e2);		}	}	initializeSwing ();	Object value = null;	try {		value = constructor.newInstance (new Object [] {new Integer (handle)});	} catch (Throwable e) {		SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);	}	final Frame frame = (Frame) value;		/*	* This is necessary to make lightweight components	* directly added to the frame receive mouse events	* properly.	*/	frame.addNotify();		/*	* Generate the appropriate events to activate and deactivate	* the embedded frame. This is needed in order to make keyboard	* focus work properly for lightweights.	*/	parent.addListener (SWT.Activate, new Listener () {		public void handleEvent (Event e) {			EventQueue.invokeLater(new Runnable () {				public void run () {					if (JDK1_3) {						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));						frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));					} else {						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_GAINED_FOCUS));					}				}			});		}	});	parent.addListener (SWT.Deactivate, new Listener () {		public void handleEvent (Event e) {			EventQueue.invokeLater(new Runnable () {				public void run () {					if (JDK1_3) {						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));						frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));					} else {						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_LOST_FOCUS));						frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));					}					if (menuSelectionManager != null && clearSelectionPath != null) {						try {							clearSelectionPath.invoke(menuSelectionManager, new Object[0]);						} catch (Throwable e) {}					}				}			});		}	});	parent.addListener (SWT.Dispose, new Listener () {		public void handleEvent (Event event) {			parent.setVisible(false);			EventQueue.invokeLater(new Runnable () {				public void run () {					frame.dispose ();				}			});		}	});	parent.getDisplay().asyncExec(new Runnable() {		public void run () {			if (parent.isDisposed()) return;			final Rectangle clientArea = parent.getClientArea();			EventQueue.invokeLater(new Runnable () {				public void run () {					frame.setSize (clientArea.width, clientArea.height);					frame.validate ();				}			});		}	});	/*	* TEMPORARY CODE	* 	* For some reason, the graphics configuration of the embedded	* frame is not initialized properly. This causes an exception	* when the depth of the screen is changed.	*/	EventQueue.invokeLater(new Runnable () {		public void run () {			try {				Class clazz = Class.forName("sun.awt.windows.WComponentPeer");				Field field = clazz.getDeclaredField("winGraphicsConfig");				field.setAccessible(true);				field.set(frame.getPeer(), frame.getGraphicsConfiguration());			} catch (Throwable e) {}		}	});	return frame;}/** * Creates a new <code>Shell</code>. This Shell is the root for * the SWT widgets that will be embedded within the AWT canvas.  *  * @param display the display for the new Shell * @param parent the parent <code>java.awt.Canvas</code> of the new Shell * @return a <code>Shell</code> to be the parent of the embedded SWT widgets *  * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the display is null</li> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> *  * @since 3.0 */public static Shell new_Shell (final Display display, final Canvas parent) {	if (display == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	int handle = 0;	try {		loadLibrary ();		handle = getAWTHandle (parent);	} catch (Throwable e) {		SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);	}	if (handle == 0) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);	final Shell shell = Shell.win32_new (display, handle);	parent.addComponentListener(new ComponentAdapter () {		public void componentResized (ComponentEvent e) {			display.syncExec (new Runnable () {				public void run () {					Dimension dim = parent.getSize ();					shell.setSize (dim.width, dim.height);				}			});		}	});	shell.setVisible (true);	return shell;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合视频网| 欧美一区二区视频网站| 国产精品久久久久久久午夜片| 国产精品自在欧美一区| 中文字幕av不卡| 99热这里都是精品| 亚洲免费在线视频一区 二区| 91天堂素人约啪| 亚洲国产美女搞黄色| 欧美少妇bbb| 日韩1区2区日韩1区2区| 久久亚洲精华国产精华液| 粉嫩13p一区二区三区| 专区另类欧美日韩| 欧美日韩免费观看一区二区三区| 亚洲成人动漫在线免费观看| 日韩免费高清电影| 95精品视频在线| 午夜精品福利一区二区三区蜜桃| 日韩色在线观看| 成人av免费在线观看| 一区二区三区国产精品| 日韩一区二区在线看片| 国产很黄免费观看久久| 亚洲精品videosex极品| 欧美一区二区三区视频免费| 国产精品一区二区男女羞羞无遮挡| 亚洲四区在线观看| 在线成人av网站| 成人午夜在线播放| 日本aⅴ精品一区二区三区| 中文字幕免费在线观看视频一区| 欧美综合久久久| 国产毛片精品国产一区二区三区| 亚洲激情校园春色| 久久综合色一综合色88| 欧美伊人久久大香线蕉综合69| 黄色小说综合网站| 亚洲成人你懂的| 日本一二三四高清不卡| 91精品免费在线| 91丨porny丨中文| 极品少妇xxxx精品少妇| 亚洲一区二区不卡免费| 久久精品夜色噜噜亚洲a∨| 欧美三区在线观看| 成人一区在线看| 久久草av在线| 日韩中文字幕麻豆| 一区二区三区欧美| 国产精品视频免费| 久久综合资源网| 日韩欧美国产wwwww| 欧美无乱码久久久免费午夜一区| 风间由美中文字幕在线看视频国产欧美| 午夜电影网亚洲视频| ...中文天堂在线一区| 久久影院视频免费| 欧美一区二区久久| 欧美日韩精品一区二区三区蜜桃 | 亚洲一区影音先锋| 国产精品亲子伦对白| 337p粉嫩大胆色噜噜噜噜亚洲| 91精品免费在线| 欧美日韩在线直播| 欧美在线影院一区二区| 91福利在线观看| 色婷婷av一区| 色综合天天性综合| 91在线视频播放地址| 成人听书哪个软件好| 国产精品1区2区3区在线观看| 精品一区二区三区影院在线午夜| 青青青爽久久午夜综合久久午夜| 亚洲一二三四在线| 亚洲444eee在线观看| 亚洲永久免费视频| 午夜久久久久久电影| 午夜成人免费电影| 亚洲黄色av一区| 亚洲狠狠爱一区二区三区| 亚洲精品久久久蜜桃| 亚洲专区一二三| 亚洲一区二区黄色| 亚洲大片精品永久免费| 五月天亚洲婷婷| 奇米精品一区二区三区在线观看一| 日韩av电影天堂| 免费在线观看不卡| 狠狠v欧美v日韩v亚洲ⅴ| 国产一区二区三区视频在线播放| 国产精品亚洲一区二区三区妖精| 国产福利不卡视频| 91亚洲永久精品| 欧美影院精品一区| 日韩一级免费一区| 久久精品视频免费观看| 中文字幕一区二区不卡| 亚洲免费色视频| 天天操天天干天天综合网| 久久精品免费看| 国产成人亚洲综合a∨婷婷| av一区二区不卡| 欧洲精品中文字幕| 欧美成人video| 国产精品久久久久久户外露出| 亚洲黄色小视频| 美女视频一区二区| 暴力调教一区二区三区| 在线亚洲+欧美+日本专区| 欧美一二三四在线| 国产精品久久久久影院亚瑟| 亚洲一区二区三区四区的| 久久国产精品99久久久久久老狼| 成人一区二区三区视频| 欧美日韩一区在线观看| 精品国产一区二区在线观看| 亚洲欧洲成人av每日更新| 亚洲国产精品一区二区www| 精品在线观看免费| 日本韩国欧美一区二区三区| 日韩欧美成人一区| 亚洲女同女同女同女同女同69| 日韩精品91亚洲二区在线观看| 国产成人福利片| 欧美日韩电影在线| 中文字幕精品一区二区精品绿巨人| 伊人开心综合网| 国产精品亚洲一区二区三区妖精 | 国产精品一二三四区| 在线观看日韩高清av| 国产三级一区二区三区| 日韩精品福利网| 色国产综合视频| 久久色视频免费观看| 亚洲成a人片综合在线| 国产成人综合在线| 91麻豆精品国产自产在线观看一区 | 99久久国产综合精品女不卡| 欧美一区二区成人6969| 亚洲精品va在线观看| 大陆成人av片| 欧美大片免费久久精品三p | 国产亚洲综合av| 美女看a上一区| 91麻豆精品国产91久久久久久| 综合自拍亚洲综合图不卡区| 国产精品一二三四区| 精品久久久三级丝袜| 亚洲成a人片在线观看中文| 91在线国内视频| 中文字幕精品在线不卡| 国产精品一区免费在线观看| 日韩欧美一卡二卡| 日韩国产精品久久久| 欧美中文字幕一二三区视频| 亚洲欧洲精品天堂一级| 成人网页在线观看| 中文幕一区二区三区久久蜜桃| 狠狠色丁香久久婷婷综合丁香| 69久久夜色精品国产69蝌蚪网| 亚洲精品美国一| 欧洲av一区二区嗯嗯嗯啊| 亚洲美女精品一区| 91在线观看成人| 亚洲人成网站精品片在线观看| 成人高清av在线| 国产精品亲子乱子伦xxxx裸| 国产91清纯白嫩初高中在线观看| 久久久国际精品| 成人综合在线观看| 国产精品短视频| 色偷偷88欧美精品久久久| 亚洲品质自拍视频网站| 在线亚洲人成电影网站色www| 亚洲精品视频在线观看网站| 在线看日本不卡| 婷婷成人综合网| 欧美精品一区二区三区在线 | 国产成人av一区| 国产精品免费久久| 色嗨嗨av一区二区三区| 亚洲第一搞黄网站| 欧美一区二区视频在线观看2022| 久久综合综合久久综合| 国产日韩一级二级三级| 成人白浆超碰人人人人| 亚洲精品乱码久久久久久黑人 | 日韩avvvv在线播放| 精品久久久网站| 不卡的av中国片| 亚洲在线观看免费| 日韩午夜在线影院| 国产成人综合在线播放| 亚洲色图欧洲色图| 911精品国产一区二区在线| 国产一区二区导航在线播放| 国产女人aaa级久久久级| 在线日韩一区二区| 久久99最新地址|