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

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

?? toolitem.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.widgets; import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.events.*;/** * Instances of this class represent a selectable user interface object * that represents a button in a tool bar. * <dl> * <dt><b>Styles:</b></dt> * <dd>PUSH, CHECK, RADIO, SEPARATOR, DROP_DOWN</dd> * <dt><b>Events:</b></dt> * <dd>Selection</dd> * </dl> * <p> * Note: Only one of the styles CHECK, PUSH, RADIO, SEPARATOR and DROP_DOWN  * may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class ToolItem extends Item {	ToolBar parent;	Control control;	String toolTipText;	Image disabledImage, hotImage;	Image disabledImage2;	int id;/** * Constructs a new instance of this class given its parent * (which must be a <code>ToolBar</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#PUSH * @see SWT#CHECK * @see SWT#RADIO * @see SWT#SEPARATOR * @see SWT#DROP_DOWN * @see Widget#checkSubclass * @see Widget#getStyle */public ToolItem (ToolBar parent, int style) {	super (parent, checkStyle (style));	this.parent = parent;	parent.createItem (this, parent.getItemCount ());}/** * Constructs a new instance of this class given its parent * (which must be a <code>ToolBar</code>), a style value * describing its behavior and appearance, and the index * at which to place it in 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 * @param index the index to store the receiver in its parent * * @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#PUSH * @see SWT#CHECK * @see SWT#RADIO * @see SWT#SEPARATOR * @see SWT#DROP_DOWN * @see Widget#checkSubclass * @see Widget#getStyle */public ToolItem (ToolBar parent, int style, int index) {	super (parent, checkStyle (style));	this.parent = parent;	parent.createItem (this, index);}/** * Adds the listener to the collection of listeners who will * be notified when the control is selected, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called when the mouse is over the arrow portion of a drop-down tool, * the event object detail field contains the value <code>SWT.ARROW</code>. * <code>widgetDefaultSelected</code> is not called. * </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);}static int checkStyle (int style) {	return checkBits (style, SWT.PUSH, SWT.CHECK, SWT.RADIO, SWT.SEPARATOR, SWT.DROP_DOWN, 0);}protected void checkSubclass () {	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);}void click (boolean dropDown) {		/*	* In order to emulate all the processing that	* happens when a mnemonic key is pressed, fake	* a mouse press and release.  This will ensure	* that radio and pull down items are handled	* properly.	*/	int hwnd = parent.handle;	if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return;	int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);	RECT rect = new RECT ();	OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);	int y = rect.top + (rect.bottom - rect.top) / 2;	int lParam = (dropDown ? rect.right - 1 : rect.left) | (y << 16);	int hotIndex = OS.SendMessage (hwnd, OS.TB_GETHOTITEM, 0, 0);	OS.SendMessage (hwnd, OS.WM_LBUTTONDOWN, 0, lParam);	OS.SendMessage (hwnd, OS.WM_LBUTTONUP, 0, lParam);	if (hotIndex != -1) {		OS.SendMessage (hwnd, OS.TB_SETHOTITEM, hotIndex, 0);	}}Image createDisabledImage (Image image, Color color) {  	/*  	* In order to be consistent with the way that disabled	* images appear in other places in the user interface,	* use the SWT Graphics to create a disabled image instead    * of calling DrawState().	*/	return new Image (display, image, SWT.IMAGE_DISABLE);	/*	* This code is intentionally commented.	*///	if (OS.IsWinCE) {//		return new Image (display, image, SWT.IMAGE_DISABLE);//	}//	Rectangle rect = image.getBounds ();//	Image disabled = new Image (display, rect);//	GC gc = new GC (disabled);//	gc.setBackground (color);//	gc.fillRectangle (rect);//	int hDC = gc.handle;//	int hImage = image.handle;//	int fuFlags = OS.DSS_DISABLED;//	switch (image.type) {//		case SWT.BITMAP: fuFlags |= OS.DST_BITMAP; break;//		case SWT.ICON: fuFlags |= OS.DST_ICON; break;//	}//	OS.DrawState (hDC, 0, 0, hImage, 0, 0, 0, rect.width, rect.height, fuFlags);//	gc.dispose ();//	return disabled;}/** * Returns a rectangle describing the receiver's size and location * relative to its parent. * * @return the receiver's bounding rectangle * * @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 Rectangle getBounds () {	checkWidget();	int hwnd = parent.handle;	int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);	RECT rect = new RECT ();	OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	return new Rectangle (rect.left, rect.top, width, height);}/** * Returns the control that is used to fill the bounds of * the item when the items is a <code>SEPARATOR</code>. * * @return the control * * @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 Control getControl () {	checkWidget();	return control;}/** * Returns the receiver's disabled image if it has one, or null * if it does not. * <p> * The disabled image is displayed when the receiver is disabled. * </p> * * @return the receiver's disabled image * * @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 Image getDisabledImage () {	checkWidget();	return disabledImage;}/** * Returns <code>true</code> if the receiver is enabled, and * <code>false</code> otherwise. A disabled control is typically * not selectable from the user interface and draws with an * inactive or "grayed" look. * * @return the receiver's enabled 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> *  * @see #isEnabled */public boolean getEnabled () {	checkWidget();	int hwnd = parent.handle;	int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);	return (fsState & OS.TBSTATE_ENABLED) != 0;}/** * Returns the receiver's hot image if it has one, or null * if it does not. * <p> * The hot image is displayed when the mouse enters the receiver. * </p> * * @return the receiver's hot image * * @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 Image getHotImage () {	checkWidget();	return hotImage;}/** * Returns the receiver's parent, which must be a <code>ToolBar</code>. * * @return the receiver's parent * * @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 ToolBar getParent () {	checkWidget();	return parent;}/** * Returns <code>true</code> if the receiver is selected, * and false otherwise. * <p> * When the receiver is of type <code>CHECK</code> or <code>RADIO</code>, * it is selected when it is checked (which some platforms draw as a * pushed in button). If the receiver is of any other type, this method * returns false. * </p> * * @return the selection 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 boolean getSelection () {	checkWidget();	if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;	int hwnd = parent.handle;	int fsState = OS.SendMessage (hwnd, OS.TB_GETSTATE, id, 0);	return (fsState & OS.TBSTATE_CHECKED) != 0;}/** * 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;}/** * Gets the width of the receiver. * * @return the width * * @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 int getWidth () {	checkWidget();	int hwnd = parent.handle;	int index = OS.SendMessage (hwnd, OS.TB_COMMANDTOINDEX, id, 0);	RECT rect = new RECT ();	OS.SendMessage (hwnd, OS.TB_GETITEMRECT, index, rect);	return rect.right - rect.left;}/** * Returns <code>true</code> if the receiver is enabled and all * of the receiver's ancestors are enabled, and <code>false</code> * otherwise. A disabled control is typically not selectable from the * user interface and draws with an inactive or "grayed" look. * * @return the receiver's enabled 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> *  * @see #getEnabled */public boolean isEnabled () {	checkWidget();	return getEnabled () && parent.isEnabled ();}void releaseChild () {	super.releaseChild ();	parent.destroyItem (this);}void releaseWidget () {	super.releaseWidget ();	parent = null;	control = null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜美腿成人在线| 婷婷综合五月天| 欧美一区午夜视频在线观看 | 日本一区二区久久| 欧洲另类一二三四区| 久久成人av少妇免费| 亚洲少妇最新在线视频| 欧美r级电影在线观看| 一本一道久久a久久精品| 国产一区二区网址| 午夜私人影院久久久久| 最新热久久免费视频| 精品精品国产高清一毛片一天堂| 色www精品视频在线观看| 国产精品一级片在线观看| 视频一区国产视频| 亚洲精品国产a| 国产精品久久久久久久久晋中| 日韩欧美卡一卡二| 制服丝袜亚洲精品中文字幕| av高清不卡在线| 国产精一区二区三区| 日韩高清在线不卡| 一二三四区精品视频| 亚洲色图在线看| 中文字幕欧美区| 2022国产精品视频| 日韩免费观看高清完整版在线观看| 欧美视频第二页| 在线免费视频一区二区| 91网站在线播放| 北条麻妃国产九九精品视频| 国产成人午夜电影网| 国产一区不卡在线| 韩国精品一区二区| 久久不见久久见中文字幕免费| 五月激情综合网| 无码av中文一区二区三区桃花岛| 亚洲国产视频一区二区| 亚洲国产精品久久人人爱| 一级精品视频在线观看宜春院| 亚洲欧美日韩电影| 一区二区三区四区不卡视频| √…a在线天堂一区| 亚洲欧美综合色| 亚洲欧美日韩中文字幕一区二区三区| 中文字幕一区二区三| 国产精品美女久久久久久久久久久 | 亚洲欧洲日产国码二区| 中文一区二区在线观看| 国产精品色在线观看| 亚洲欧美综合网| 亚洲自拍都市欧美小说| 亚洲成人av电影在线| 日韩av中文字幕一区二区| 蜜臀av性久久久久蜜臀av麻豆| 麻豆国产欧美一区二区三区| 激情综合网激情| 国产不卡视频在线播放| av一二三不卡影片| 在线欧美一区二区| 91精品国产91热久久久做人人| 日韩欧美高清在线| 国产午夜亚洲精品羞羞网站| 国产精品欧美极品| 亚洲综合激情小说| 美女一区二区视频| 国产成人亚洲综合a∨婷婷图片| 成人动漫一区二区三区| 色综合久久中文字幕| 在线播放中文一区| 久久久91精品国产一区二区精品| 国产一区 二区| 91色porny在线视频| 99在线精品一区二区三区| 91麻豆福利精品推荐| 91福利国产精品| 欧美日本国产视频| 欧美成人bangbros| 国产精品色婷婷久久58| 亚洲视频网在线直播| 亚洲香蕉伊在人在线观| 日日夜夜精品视频天天综合网| 天使萌一区二区三区免费观看| 日本午夜一本久久久综合| 激情文学综合插| 国产精品69毛片高清亚洲| 在线观看一区不卡| 欧美va亚洲va| 国产精品久久精品日日| 亚洲尤物视频在线| 国产老女人精品毛片久久| www.亚洲人| 欧美日韩国产小视频| 国产午夜精品理论片a级大结局 | 99精品久久只有精品| 精品1区2区3区| 精品国产91乱码一区二区三区 | 91免费看`日韩一区二区| 欧美日本韩国一区二区三区视频| 久久青草国产手机看片福利盒子 | 亚洲免费观看高清完整| 日本欧洲一区二区| 成人黄色小视频在线观看| 欧美日韩性生活| 久久在线观看免费| 亚洲毛片av在线| 日韩经典一区二区| 国产+成+人+亚洲欧洲自线| 欧美午夜在线观看| 国产午夜精品一区二区| 亚洲午夜精品网| 国产成人av资源| 欧美成人欧美edvon| 一区二区三区在线免费播放| 九一久久久久久| 欧美中文字幕一区二区三区| 久久一区二区三区四区| 午夜精品久久久久久不卡8050| 国产精品一级二级三级| 欧美日韩国产三级| 136国产福利精品导航| 韩国午夜理伦三级不卡影院| 欧美在线一二三四区| 日本一区二区三区久久久久久久久不| 亚洲高清免费观看| 91麻豆文化传媒在线观看| 久久毛片高清国产| 国产精品一卡二卡在线观看| 欧美日韩视频专区在线播放| 国产精品欧美综合在线| 寂寞少妇一区二区三区| 欧美日韩大陆在线| 亚洲宅男天堂在线观看无病毒| 国产成人鲁色资源国产91色综| 欧美日韩国产精品自在自线| 欧美日韩国产综合久久 | 99re8在线精品视频免费播放| 欧美午夜在线一二页| 国产精品美女一区二区| 免费亚洲电影在线| 91麻豆精品91久久久久同性| 亚洲一区二区视频在线观看| 麻豆91在线播放免费| 欧美精品v国产精品v日韩精品| 亚洲免费毛片网站| 91蝌蚪国产九色| 中文字幕佐山爱一区二区免费| 日韩不卡免费视频| 欧美性淫爽ww久久久久无| 亚洲女同ⅹxx女同tv| 成人午夜电影久久影院| 国产丝袜美腿一区二区三区| 久久成人久久爱| 精品国产乱子伦一区| 久久国产精品免费| 欧美日韩不卡视频| 亚洲成人www| 日韩一区二区三区电影在线观看 | 欧美xxx久久| 麻豆久久久久久久| 91网站在线观看视频| 亚洲精品一二三| 欧美色网一区二区| 天天综合网天天综合色| 91成人国产精品| 国产精品视频观看| 成人黄色777网| 亚洲免费在线观看| 欧美日韩免费不卡视频一区二区三区| 亚洲桃色在线一区| 欧美日韩视频第一区| 亚洲成人免费在线| 在线播放日韩导航| 麻豆成人久久精品二区三区红| 日韩欧美国产精品一区| 国产精品亚洲人在线观看| 国产精品乱子久久久久| 色综合久久天天| ...中文天堂在线一区| 91精品午夜视频| 国产伦精品一区二区三区免费迷 | 欧美片网站yy| 国内精品免费在线观看| 国产欧美日产一区| www.在线欧美| 香蕉成人啪国产精品视频综合网| 91精品国产综合久久精品app| 麻豆传媒一区二区三区| 2020国产成人综合网| 久久成人精品无人区| 中文字幕在线一区二区三区| 在线免费视频一区二区| 极品少妇一区二区| 日韩理论在线观看| 在线观看网站黄不卡| 亚洲成av人片在www色猫咪| 7777精品久久久大香线蕉 | 成人av网址在线| 午夜亚洲福利老司机|