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

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

?? trayitem.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.widgets;import org.eclipse.swt.*;import org.eclipse.swt.events.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.internal.win32.*;/** * Instances of this class represent icons that can be placed on the * system tray or task bar status area. * * <dl> * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, MenuDetect, Selection</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> *  * @since 3.0 */public class TrayItem extends Item {	Tray parent;	int id;	Image image2;	String toolTipText;	boolean visible = true;	/** * Constructs a new instance of this class given its parent * (which must be a <code>Tray</code>) and a style value * describing its behavior and appearance. The item is added * to the end of the items maintained by its parent. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together  * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> * * @param parent a composite control which will be the parent of the new instance (cannot be null) * @param style the style of control to construct * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @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 SWT * @see Widget#checkSubclass * @see Widget#getStyle */public TrayItem (Tray parent, int style) {	super (parent, style);	this.parent = parent;	parent.createItem (this, parent.getItemCount ());	createWidget ();}/** * Adds the listener to the collection of listeners who will * be notified when the receiver is selected, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is called when the receiver is selected * <code>widgetDefaultSelected</code> is called when the receiver is double-clicked * </p> * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @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> * * @see SelectionListener * @see #removeSelectionListener * @see SelectionEvent */public void addSelectionListener(SelectionListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Selection,typedListener);	addListener (SWT.DefaultSelection,typedListener);}void createWidget () {	if (OS.IsWinCE) return;	NOTIFYICONDATA iconData = OS.IsUnicode ? (NOTIFYICONDATA) new NOTIFYICONDATAW () : new NOTIFYICONDATAA ();	iconData.cbSize = NOTIFYICONDATA.sizeof;	iconData.uID = id = display.nextTrayId++;	iconData.hWnd = display.hwndMessage;	iconData.uFlags = OS.NIF_MESSAGE;	iconData.uCallbackMessage = Display.SWT_TRAYICONMSG;	OS.Shell_NotifyIcon (OS.NIM_ADD, iconData);}/** * Returns the receiver's tool tip text, or null if it has * not been set. * * @return the receiver's tool tip text * * @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> */public String getToolTipText () {	checkWidget ();	return toolTipText;}/** * Returns <code>true</code> if the receiver is visible and  * <code>false</code> otherwise. * * @return the receiver's visibility * * @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> */public boolean getVisible () {	checkWidget ();	return visible;}int messageProc (int hwnd, int msg, int wParam, int lParam) {	/*	* Feature in Windows.  When the user clicks on the tray	* icon, another application may be the foreground window.	* This means that the event loop is not running and can	* cause problems.  For example, if a menu is shown, when	* the user clicks outside of the menu to cancel it, the	* menu is not hidden until an event is processed.  If	* another application is the foreground window, then the	* menu is not hidden.  The fix is to force the tray icon	* message window to the foreground when sending an event.	*/	switch (lParam) {		case OS.WM_LBUTTONDOWN:			if (hooks (SWT.Selection)) {				OS.SetForegroundWindow (hwnd);				postEvent (SWT.Selection);			}			break;		case OS.WM_LBUTTONDBLCLK:		case OS.WM_RBUTTONDBLCLK:			if (hooks (SWT.DefaultSelection)) {				OS.SetForegroundWindow (hwnd);				postEvent (SWT.DefaultSelection);			}			break;		case OS.WM_RBUTTONUP: {			if (hooks (SWT.MenuDetect)) {				OS.SetForegroundWindow (hwnd);				sendEvent (SWT.MenuDetect);				// widget could be disposed at this point				if (isDisposed()) return 0;			}			break;		}	}	display.wakeThread ();	return 0;}void recreate () {	createWidget ();	if (!visible) setVisible (false);	if (text.length () != 0) setText (text);	if (image != null) setImage (image);	if (toolTipText != null) setToolTipText (toolTipText);}void releaseChild () {	super.releaseChild ();	parent.destroyItem (this);}void releaseWidget () {	super.releaseWidget ();	if (image2 != null) image2.dispose ();	image2 = null;	toolTipText = null;	if (OS.IsWinCE) return;	NOTIFYICONDATA iconData = OS.IsUnicode ? (NOTIFYICONDATA) new NOTIFYICONDATAW () : new NOTIFYICONDATAA ();	iconData.cbSize = NOTIFYICONDATA.sizeof;	iconData.uID = id;	iconData.hWnd = display.hwndMessage;	OS.Shell_NotifyIcon (OS.NIM_DELETE, iconData);}	/** * Removes the listener from the collection of listeners who will * be notified when the receiver is selected. * * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @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> * * @see SelectionListener * @see #addSelectionListener */public void removeSelectionListener(SelectionListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	if (eventTable == null) return;	eventTable.unhook (SWT.Selection, listener);	eventTable.unhook (SWT.DefaultSelection,listener);	}/** * Sets the receiver's image. * * @param image the new image * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @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> */public void setImage (Image image) {	checkWidget ();	if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);	super.setImage (image);	if (OS.IsWinCE) return;	if (image2 != null) image2.dispose ();	image2 = null;	int hIcon = 0;	Image icon = image;	if (icon != null) {		switch (icon.type) {			case SWT.BITMAP:				ImageData data = icon.getImageData ();				ImageData mask = data.getTransparencyMask ();				image2 = new Image (display, data, mask);				hIcon = image2.handle;				break;			case SWT.ICON:				hIcon = icon.handle;				break;		}	}	NOTIFYICONDATA iconData = OS.IsUnicode ? (NOTIFYICONDATA) new NOTIFYICONDATAW () : new NOTIFYICONDATAA ();	iconData.cbSize = NOTIFYICONDATA.sizeof;	iconData.uID = id;	iconData.hWnd = display.hwndMessage;	iconData.hIcon = hIcon;	iconData.uFlags = OS.NIF_ICON;	OS.Shell_NotifyIcon (OS.NIM_MODIFY, iconData);}/** * Sets the receiver's tool tip text to the argument, which * may be null indicating that no tool tip text should be shown. * * @param value the new tool tip text (or null) * * @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> */public void setToolTipText (String value) {	checkWidget ();	toolTipText = value;	if (OS.IsWinCE) return;	NOTIFYICONDATA iconData = OS.IsUnicode ? (NOTIFYICONDATA) new NOTIFYICONDATAW () : new NOTIFYICONDATAA ();	TCHAR buffer = new TCHAR (0, toolTipText == null ? "" : toolTipText, true);	/*	* Note that the size of the szTip field is different	* in version 5.0 of shell32.dll.	*/	int length = OS.SHELL32_MAJOR < 5 ? 64 : 128;	if (OS.IsUnicode) {		char [] szTip = ((NOTIFYICONDATAW) iconData).szTip;		length = Math.min (length - 1, buffer.length ());		System.arraycopy (buffer.chars, 0, szTip, 0, length);	} else {		byte [] szTip = ((NOTIFYICONDATAA) iconData).szTip;		length = Math.min (length - 1, buffer.length ());		System.arraycopy (buffer.bytes, 0, szTip, 0, length);	}	iconData.cbSize = NOTIFYICONDATA.sizeof;	iconData.uID = id;	iconData.hWnd = display.hwndMessage;	iconData.uFlags = OS.NIF_TIP;	OS.Shell_NotifyIcon (OS.NIM_MODIFY, iconData);}/** * Makes the receiver visible if the argument is <code>true</code>, * and makes it invisible otherwise.  * * @param visible the new visibility state * * @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> */public void setVisible (boolean visible) {	checkWidget ();	if (this.visible == visible) return;	if (visible) {		/*		* It is possible (but unlikely), that application		* code could have disposed the widget in the show		* event.  If this happens, just return.		*/		sendEvent (SWT.Show);		if (isDisposed ()) return;	}	this.visible = visible;	if (!OS.IsWinCE) {		NOTIFYICONDATA iconData = OS.IsUnicode ? (NOTIFYICONDATA) new NOTIFYICONDATAW () : new NOTIFYICONDATAA ();		iconData.cbSize = NOTIFYICONDATA.sizeof;		iconData.uID = id;		iconData.hWnd = display.hwndMessage;		if (OS.SHELL32_MAJOR < 5) {			if (visible) {				iconData.uFlags = OS.NIF_MESSAGE;				iconData.uCallbackMessage = Display.SWT_TRAYICONMSG;				OS.Shell_NotifyIcon (OS.NIM_ADD, iconData);				setImage (image);				setToolTipText (toolTipText);			} else {				OS.Shell_NotifyIcon (OS.NIM_DELETE, iconData);			}		} else {			iconData.uFlags = OS.NIF_STATE;			iconData.dwState = visible ? 0 : OS.NIS_HIDDEN;			iconData.dwStateMask = OS.NIS_HIDDEN;			OS.Shell_NotifyIcon (OS.NIM_MODIFY, iconData);		}	}	if (!visible) sendEvent (SWT.Hide);}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人一区二区精品非洲| 精品国产百合女同互慰| 欧美电视剧在线观看完整版| 国产精品毛片久久久久久久| 美腿丝袜一区二区三区| 91免费国产在线| 欧美激情中文字幕| 经典三级在线一区| 日韩一区二区三区四区| 亚洲午夜在线电影| 日本道色综合久久| 中文一区一区三区高中清不卡| 免费精品视频在线| 欧美一卡二卡三卡四卡| 亚洲国产综合视频在线观看| 成人精品国产福利| 久久久无码精品亚洲日韩按摩| 日韩福利电影在线| 欧美日韩一二三区| 午夜一区二区三区视频| 在线国产亚洲欧美| 亚洲无人区一区| 欧美视频一区二区在线观看| 亚洲精品免费在线观看| 色老汉一区二区三区| 国产精品电影一区二区| heyzo一本久久综合| 欧美激情一区不卡| 成人污视频在线观看| 国产欧美日韩在线视频| 国产成人午夜精品影院观看视频| 久久久国际精品| 国产美女精品在线| 国产午夜精品一区二区三区视频 | 国内一区二区视频| 日韩美女视频在线| 国产一区二区中文字幕| 国产日韩欧美精品在线| 成人黄色在线网站| 亚洲美腿欧美偷拍| 欧美日韩在线播放一区| 琪琪久久久久日韩精品| 欧美一级在线免费| 黄一区二区三区| 中文av一区二区| 日本大香伊一区二区三区| 午夜精品视频在线观看| 91精品久久久久久久99蜜桃| 看片的网站亚洲| 国产欧美一区二区精品仙草咪| 成人免费视频一区| 亚洲综合男人的天堂| 日韩一区二区三区在线观看| 国产 欧美在线| 亚洲激情欧美激情| 日韩精品一区二区三区在线播放| 国产成人在线视频网址| 亚洲精品国产精品乱码不99| 欧美一级爆毛片| 成人高清在线视频| 午夜欧美一区二区三区在线播放| 欧美mv日韩mv| 白白色 亚洲乱淫| 天天综合天天做天天综合| 久久久亚洲精品石原莉奈| 日本高清视频一区二区| 紧缚奴在线一区二区三区| 国产精品电影院| 日韩欧美一二三区| 色婷婷精品久久二区二区蜜臀av | 亚洲男人电影天堂| 婷婷一区二区三区| 久久综合久久综合久久综合| 99久免费精品视频在线观看| 日韩国产精品久久久久久亚洲| 久久精品亚洲精品国产欧美kt∨| 欧美羞羞免费网站| 国产精品白丝jk黑袜喷水| 午夜av一区二区三区| 亚洲国产精品传媒在线观看| 在线不卡a资源高清| 成年人国产精品| 精品一区二区国语对白| 亚洲一级在线观看| 亚洲日本va午夜在线影院| 精品国产第一区二区三区观看体验| 在线观看精品一区| 99久久免费视频.com| 国模冰冰炮一区二区| 亚洲成av人**亚洲成av**| 1000精品久久久久久久久| 精品日产卡一卡二卡麻豆| 欧美精三区欧美精三区| 91女厕偷拍女厕偷拍高清| 国产精华液一区二区三区| 久久精品国产一区二区三| 亚洲成av人**亚洲成av**| 一区二区三区高清在线| 综合在线观看色| 国产精品三级视频| 国产蜜臀av在线一区二区三区| 精品久久久久久久人人人人传媒| 欧美日韩亚洲综合| 在线观看国产一区二区| 在线观看日韩电影| 欧美亚洲一区二区在线| 欧美综合视频在线观看| 在线欧美小视频| 色欧美片视频在线观看在线视频| 99久久99久久精品免费观看| 成人免费高清在线| 成人精品免费视频| 9i看片成人免费高清| 99久久久无码国产精品| 91网站最新地址| 在线视频一区二区免费| 欧美影视一区二区三区| 91久久精品一区二区三| 欧美视频在线播放| 宅男噜噜噜66一区二区66| 日韩一区二区视频| 26uuuu精品一区二区| 久久久久久亚洲综合影院红桃| 久久精品亚洲精品国产欧美| 国产精品久久三区| 一区二区在线观看免费| 午夜一区二区三区视频| 久久97超碰色| 懂色av中文字幕一区二区三区| 成人精品电影在线观看| 日本久久一区二区三区| 欧美一区日韩一区| 久久先锋影音av| 亚洲精品视频一区| 日日夜夜免费精品视频| 国产原创一区二区三区| 播五月开心婷婷综合| 欧美日韩精品一二三区| 2021国产精品久久精品| 亚洲欧洲性图库| 日韩精品亚洲一区| 国产999精品久久久久久绿帽| 91视频免费观看| 日韩一区二区精品葵司在线| 国产精品欧美一区喷水| 亚洲sss视频在线视频| 国产一区在线观看视频| 在线中文字幕不卡| 亚洲精品在线观看视频| 亚洲精品视频在线观看网站| 久久国产夜色精品鲁鲁99| 一本久道中文字幕精品亚洲嫩| 精品国产一区久久| 亚洲影院理伦片| 成人午夜私人影院| 欧美日韩aaaaaa| 国产精品白丝在线| 久久国产精品99精品国产| 91麻豆精品在线观看| 久久午夜色播影院免费高清| 性感美女极品91精品| 99热这里都是精品| 精品国一区二区三区| 一区二区三区欧美日韩| 国产成人免费高清| 欧美一区二区三区公司| 一区二区三区四区亚洲| 国产成人免费在线观看| 日韩精品一区二区三区在线观看| 一区二区三区在线影院| 国产精品中文字幕欧美| 91精品国产综合久久久蜜臀粉嫩 | 免费观看成人鲁鲁鲁鲁鲁视频| 成人动漫在线一区| 欧美成人女星排名| 日韩高清不卡在线| 欧美三区在线观看| 亚洲欧美在线aaa| 成人视屏免费看| 久久久久国色av免费看影院| 久久99国产精品久久99果冻传媒| 欧美麻豆精品久久久久久| 亚洲免费观看高清完整版在线观看 | 欧美大片在线观看一区二区| 一区二区三区四区中文字幕| 成人av动漫在线| 国产欧美综合色| 经典三级视频一区| 精品欧美乱码久久久久久1区2区| 婷婷一区二区三区| 欧美久久高跟鞋激| 天天综合日日夜夜精品| 欧美色图12p| 亚洲制服欧美中文字幕中文字幕| 色哟哟国产精品| 亚洲一区影音先锋| 欧美视频在线一区| 五月天精品一区二区三区| 欧美老年两性高潮| 视频一区免费在线观看|