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

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

?? ccombo.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************* * 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.custom;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.events.*;import org.eclipse.swt.widgets.*;import org.eclipse.swt.accessibility.*;/** * The CCombo class represents a selectable user interface object * that combines a text field and a list and issues notificiation * when an item is selected from the list. * <p> * Note that although this class is a subclass of <code>Composite</code>, * it does not make sense to add children to it, or set a layout on it. * </p> * <dl> * <dt><b>Styles:</b> * <dd>BORDER, READ_ONLY, FLAT</dd> * <dt><b>Events:</b> * <dd>Selection</dd> * </dl> */public final class CCombo extends Composite {	Text text;	List list;	int visibleItemCount = 5;	Shell popup;	Button arrow;	boolean hasFocus;	Listener listener, filter;	Color foreground, background;	Font font;	/** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <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 widget which will be the parent of the new instance (cannot be null) * @param style the style of widget 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> * </ul> * * @see SWT#BORDER * @see SWT#READ_ONLY * @see SWT#FLAT * @see Widget#getStyle() */public CCombo (Composite parent, int style) {	super (parent, style = checkStyle (style));		int textStyle = SWT.SINGLE;	if ((style & SWT.READ_ONLY) != 0) textStyle |= SWT.READ_ONLY;	if ((style & SWT.FLAT) != 0) textStyle |= SWT.FLAT;	text = new Text (this, textStyle);	int arrowStyle = SWT.ARROW | SWT.DOWN;	if ((style & SWT.FLAT) != 0) arrowStyle |= SWT.FLAT;	arrow = new Button (this, arrowStyle);	listener = new Listener () {		public void handleEvent (Event event) {			if (popup == event.widget) {				popupEvent (event);				return;			}			if (text == event.widget) {				textEvent (event);				return;			}			if (list == event.widget) {				listEvent (event);				return;			}			if (arrow == event.widget) {				arrowEvent (event);				return;			}			if (CCombo.this == event.widget) {				comboEvent (event);				return;			}			if (getShell () == event.widget) {				handleFocus (SWT.FocusOut);			}		}	};	filter = new Listener() {		public void handleEvent(Event event) {			Shell shell = ((Control)event.widget).getShell ();			if (shell == CCombo.this.getShell ()) {				handleFocus (SWT.FocusOut);			}		}	};		int [] comboEvents = {SWT.Dispose, SWT.Move, SWT.Resize};	for (int i=0; i<comboEvents.length; i++) this.addListener (comboEvents [i], listener);		int [] textEvents = {SWT.KeyDown, SWT.KeyUp, SWT.Modify, SWT.MouseDown, SWT.MouseUp, SWT.Traverse, SWT.FocusIn};	for (int i=0; i<textEvents.length; i++) text.addListener (textEvents [i], listener);		int [] arrowEvents = {SWT.Selection, SWT.FocusIn};	for (int i=0; i<arrowEvents.length; i++) arrow.addListener (arrowEvents [i], listener);		createPopup(null, -1);	initAccessible();}static int checkStyle (int style) {	int mask = SWT.BORDER | SWT.READ_ONLY | SWT.FLAT | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;	return style & mask;}/*** Adds an item.* <p>* The item is placed at the end of the list.* Indexing is zero based.** @param string the new item** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed* @exception SWTError(ERROR_NULL_ARGUMENT)*	when the string is null* @exception SWTError(ERROR_ITEM_NOT_ADDED)*	when the item cannot be added*/public void add (String string) {	checkWidget();	if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	list.add (string);}/*** Adds an item at an index.* <p>* The item is placed at an index in the list.* Indexing is zero based.** This operation will fail when the index is* out of range.** @param string the new item* @param index the index for the item** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed* @exception SWTError(ERROR_NULL_ARGUMENT)*	when the string is null* @exception SWTError(ERROR_ITEM_NOT_ADDED)*	when the item cannot be added*/public void add (String string, int index) {	checkWidget();	if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	list.add (string, index);}/**	 * Adds the listener to receive events.* <p>** @param listener the listener** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed* @exception SWTError(ERROR_NULL_ARGUMENT)*	when listener is null*/public void addModifyListener (ModifyListener listener) {	checkWidget();	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Modify, typedListener);}/**	 * Adds the listener to receive events.* <p>** @param listener the listener** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed* @exception SWTError(ERROR_NULL_ARGUMENT)*	when listener is null*/public void addSelectionListener(SelectionListener listener) {	checkWidget();	if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Selection,typedListener);	addListener (SWT.DefaultSelection,typedListener);}void arrowEvent (Event event) {	switch (event.type) {		case SWT.FocusIn: {			handleFocus (SWT.FocusIn);			break;		}		case SWT.Selection: {			dropDown (!isDropped ());			break;		}	}}/*** Clears the current selection.* <p>** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed*/public void clearSelection () {	checkWidget();	text.clearSelection ();	list.deselectAll ();}void comboEvent (Event event) {	switch (event.type) {		case SWT.Dispose:			if (popup != null && !popup.isDisposed ()) {				list.removeListener(SWT.Dispose, listener);				popup.dispose ();			}			Shell shell = getShell ();			shell.removeListener(SWT.Deactivate, listener);			Display display = getDisplay();			display.removeFilter(SWT.FocusIn, filter);			popup = null;  			text = null;  			list = null;  			arrow = null;			break;		case SWT.Move:			dropDown(false);			break;		case SWT.Resize:			internalLayout();			break;	}}public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget();	int width = 0, height = 0;	Point textSize = text.computeSize (wHint, SWT.DEFAULT, changed);	Point arrowSize = arrow.computeSize(SWT.DEFAULT, SWT.DEFAULT, changed);	Point listSize = list.computeSize (wHint, SWT.DEFAULT, changed);	int borderWidth = getBorderWidth();		height = Math.max (hHint, Math.max(textSize.y, arrowSize.y)  + 2*borderWidth);	width = Math.max (wHint, Math.max(textSize.x + arrowSize.x + 2*borderWidth, listSize.x + 2)  );	return new Point (width, height);}void createPopup(String[] items, int selectionIndex) {				// create shell and list		popup = new Shell (getShell(), SWT.NO_TRIM | SWT.ON_TOP);		int style = getStyle();		int listStyle = SWT.SINGLE | SWT.V_SCROLL;		if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;		if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;		if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;		list = new List (popup, listStyle);		if (font != null) list.setFont(font);		if (foreground != null) list.setForeground(foreground);		if (background != null) list.setBackground(background);				int [] popupEvents = {SWT.Close, SWT.Paint, SWT.Deactivate};		for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);		int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.Dispose};		for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);				if (items != null) list.setItems(items);		if (selectionIndex != -1) list.setSelection(selectionIndex);}/*** Deselects an item.* <p>* If the item at an index is selected, it is* deselected.  If the item at an index is not* selected, it remains deselected.  Indices* that are out of range are ignored.  Indexing* is zero based.** @param index the index of the item** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed*/public void deselect (int index) {	checkWidget();	list.deselect (index);}/*** Deselects all items.* <p>** If an item is selected, it is deselected.* If an item is not selected, it remains unselected.** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed*/public void deselectAll () {	checkWidget();	list.deselectAll ();}void dropDown (boolean drop) {	if (drop == isDropped ()) return;	if (!drop) {		popup.setVisible (false);		text.setFocus();		return;	}	if (getShell() != popup.getParent()) {		String[] items = list.getItems();		int selectionIndex = list.getSelectionIndex();		list.removeListener(SWT.Dispose, listener);		popup.dispose();		popup = null;		list = null;		createPopup(items, selectionIndex);	}		Point size = getSize();	int itemCount = list.getItemCount();	itemCount = (itemCount == 0) ? visibleItemCount : Math.min(visibleItemCount, itemCount);	int itemHeight = list.getItemHeight () * itemCount;	Point listSize = list.computeSize (SWT.DEFAULT, itemHeight);	list.setBounds (1, 1, Math.max (size.x - 2, listSize.x), listSize.y);		int index = list.getSelectionIndex ();	if (index != -1) list.setTopIndex (index);	Display display = getDisplay ();	Rectangle listRect = list.getBounds ();	Rectangle parentRect = display.map (getParent (), null, getBounds());	Point comboSize = getSize ();	Rectangle displayRect = getMonitor().getClientArea();	int width = Math.max (comboSize.x, listRect.width + 2);	int height = listRect.height + 2;	int x = parentRect.x;	int y = parentRect.y + comboSize.y;	if (y + height > displayRect.y + displayRect.height) y = parentRect.y - height;	popup.setBounds (x, y, width, height);	popup.setVisible (true);	list.setFocus();}/*  * Return the Label immediately preceding the receiver in the z-order,  * or null if none.  */Label getAssociatedLabel () {	Control[] siblings = getParent().getChildren();	for (int i = 0; i < siblings.length; i++) {		if (siblings[i] == CCombo.this) {			if (i > 0 && siblings[i-1] instanceof Label) {				return (Label) siblings[i-1];			}		}	}	return null;}public Control [] getChildren () {	checkWidget();	return new Control [0];}/** * Gets the editable state. *  * @return true if the contents can be edited * * @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> * * @since 3.0 * */public boolean getEditable () {	checkWidget ();	return text.getEditable();}/*** Gets an item at an index.* <p>* Indexing is zero based.** This operation will fail when the index is out* of range or an item could not be queried from* the OS.** @param index the index of the item* @return the item** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed* @exception SWTError(ERROR_CANNOT_GET_ITEM)*	when the operation fails*/public String getItem (int index) {	checkWidget();	return list.getItem (index);}/*** Gets the number of items.* <p>* This operation will fail if the number of* items could not be queried from the OS.** @return the number of items in the widget** @exception SWTError(ERROR_THREAD_INVALID_ACCESS)*	when called from the wrong thread* @exception SWTError(ERROR_WIDGET_DISPOSED)*	when the widget has been disposed

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久你懂得1024| 亚洲蜜臀av乱码久久精品蜜桃| 国产色综合一区| 中文字幕一区二| 天天影视色香欲综合网老头| 国产自产2019最新不卡| 91免费版在线看| 精品999久久久| 亚洲乱码国产乱码精品精98午夜 | 99久久精品国产观看| 欧美日韩国产综合一区二区| 精品91自产拍在线观看一区| 亚洲另类在线一区| 国产91丝袜在线18| 日韩精品专区在线| 一个色综合av| 国产91精品精华液一区二区三区| 欧美裸体一区二区三区| 中文字幕精品综合| 国产在线麻豆精品观看| 777a∨成人精品桃花网| 成人午夜在线播放| 国产资源精品在线观看| 美女视频一区二区三区| 在线中文字幕不卡| 国产精品女人毛片| 国产乱码一区二区三区| 日韩欧美精品三级| 丝袜美腿高跟呻吟高潮一区| 91福利资源站| 国产精品久久久久久久蜜臀 | 91精品午夜视频| 伊人开心综合网| av在线一区二区| 国产喷白浆一区二区三区| 久久成人久久爱| 日韩欧美国产成人一区二区| 青娱乐精品在线视频| 欧美日本韩国一区二区三区视频| 亚洲老妇xxxxxx| 国产人成亚洲第一网站在线播放| 7777精品伊人久久久大香线蕉最新版| 国产麻豆精品在线| 日韩视频不卡中文| 日韩福利视频导航| 69堂精品视频| 男男成人高潮片免费网站| 在线不卡中文字幕| 日韩国产精品91| 7777精品伊人久久久大香线蕉| 性久久久久久久| 欧美日韩精品三区| 日韩一区精品视频| 欧美一卡二卡在线观看| 激情成人午夜视频| 久久噜噜亚洲综合| 国产成人精品亚洲日本在线桃色| 久久婷婷国产综合国色天香| 国产乱对白刺激视频不卡| 国产亚洲欧美日韩日本| 粉嫩欧美一区二区三区高清影视| 狠狠色伊人亚洲综合成人| 日韩激情av在线| www.亚洲色图| 玉米视频成人免费看| 欧美精品久久99久久在免费线 | 久久伊人蜜桃av一区二区| 国产一区日韩二区欧美三区| 中文字幕av资源一区| 91丝袜高跟美女视频| 无码av中文一区二区三区桃花岛| 日韩一区二区在线看| 国产激情视频一区二区在线观看| 欧美极品美女视频| 在线观看91精品国产入口| 麻豆视频一区二区| 国产精品灌醉下药二区| 欧美日韩一卡二卡三卡| 国产精品综合av一区二区国产馆| 中文字幕亚洲精品在线观看| 欧美亚洲精品一区| 国产美女精品人人做人人爽| 国产精品福利一区二区三区| 欧美特级限制片免费在线观看| 国产最新精品免费| 一区二区三区日韩| 国产亚洲综合性久久久影院| 欧美日韩精品欧美日韩精品一 | 国产成人免费高清| 亚洲成av人片在线观看无码| 久久精品综合网| 欧美酷刑日本凌虐凌虐| 成人免费视频视频| 蜜臀av性久久久久av蜜臀妖精| 亚洲欧洲另类国产综合| 精品伦理精品一区| 欧美日韩午夜在线视频| 97精品电影院| 国产一区二区视频在线| 亚洲h精品动漫在线观看| 国产日产欧美一区二区视频| 欧美日韩亚洲国产综合| 国产精品亚洲视频| 蜜臀久久99精品久久久久宅男| 国产精品福利影院| 欧美一区二区三区免费大片| 成人丝袜视频网| 精品影视av免费| 亚洲精品久久久久久国产精华液| 精品奇米国产一区二区三区| 99视频有精品| 蜜臀精品久久久久久蜜臀| 亚洲另类色综合网站| xnxx国产精品| 欧美日本在线视频| 国产精品自拍三区| 久久国产精品色婷婷| 无吗不卡中文字幕| 亚洲人123区| 久久午夜国产精品| 欧美大片在线观看一区二区| 在线免费精品视频| 粉嫩aⅴ一区二区三区四区| 免费人成在线不卡| 亚洲成人免费观看| 亚洲激情综合网| 亚洲午夜精品久久久久久久久| 欧美高清在线一区| 久久久久国产精品人| 91精品久久久久久久99蜜桃| 99精品久久只有精品| 国产馆精品极品| 国产精品亚洲视频| 激情都市一区二区| 成人丝袜视频网| 成人精品小蝌蚪| 粉嫩嫩av羞羞动漫久久久| 精品一区二区三区av| 激情综合网av| 国产精华液一区二区三区| 国产福利一区二区三区| 亚洲欧美偷拍三级| 国产精品成人网| 在线观看日韩av先锋影音电影院| 国产传媒日韩欧美成人| 成人综合激情网| 色拍拍在线精品视频8848| 91美女片黄在线| 日本道免费精品一区二区三区| 一本一道久久a久久精品| 欧洲一区在线电影| 欧美日本在线看| 91麻豆精品国产自产在线观看一区 | 99久久精品国产观看| 国产一二精品视频| 波多野结衣一区二区三区| 97成人超碰视| 欧美日韩精品欧美日韩精品一综合| av亚洲精华国产精华精华| 狠狠色丁香婷综合久久| 久久精品国产亚洲a| caoporm超碰国产精品| 色88888久久久久久影院按摩 | 欧美日韩国产一二三| 8x8x8国产精品| 国产精品久久久一本精品| 综合久久综合久久| 天堂精品中文字幕在线| 亚洲成a天堂v人片| 风间由美一区二区av101| 欧美伊人久久大香线蕉综合69| 91精品国产综合久久久蜜臀粉嫩| 在线国产电影不卡| 国产精品视频在线看| 亚洲男人天堂av网| 久久精品国产精品亚洲综合| 午夜电影网一区| 成人国产一区二区三区精品| 欧美主播一区二区三区| 久久男人中文字幕资源站| 亚洲婷婷综合色高清在线| 亚洲sss视频在线视频| 成人小视频在线观看| 欧美乱妇15p| 一区二区高清视频在线观看| 麻豆成人久久精品二区三区小说| 国产高清精品网站| 欧美疯狂做受xxxx富婆| 国产性天天综合网| 日韩精品高清不卡| 欧美亚洲国产bt| 国产三区在线成人av| 亚洲第一成年网| 日本亚洲最大的色成网站www| 91麻豆福利精品推荐| 久久色在线视频| 爽好多水快深点欧美视频| 欧美日韩一区二区电影| 17c精品麻豆一区二区免费| 黄色日韩三级电影|