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

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

?? list.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/******************************************************************************* * 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 displays a list of strings and issues notificiation * when a string selected.  A list may be single or multi select. * <p> * <dl> * <dt><b>Styles:</b></dt> * <dd>SINGLE, MULTI</dd> * <dt><b>Events:</b></dt> * <dd>Selection, DefaultSelection</dd> * </dl> * <p> * Note: Only one of SINGLE and MULTI may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class List extends Scrollable {	static final int ListProc;	static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true);	static {		WNDCLASS lpWndClass = new WNDCLASS ();		OS.GetClassInfo (0, ListClass, lpWndClass);		ListProc = lpWndClass.lpfnWndProc;	}/** * 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 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#SINGLE * @see SWT#MULTI * @see Widget#checkSubclass * @see Widget#getStyle */public List (Composite parent, int style) {	super (parent, checkStyle (style));}/** * Adds the argument to the end of the receiver's list. * * @param string the new item * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the string 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> * @exception SWTError <ul> *    <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li> * </ul> * * @see #add(String,int) */public void add (String string) {	checkWidget ();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	TCHAR buffer = new TCHAR (getCodePage (), string, true);	int result = OS.SendMessage (handle, OS.LB_ADDSTRING, 0, buffer);	if (result == OS.LB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);	if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);	if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, true);}/** * Adds the argument to the receiver's list at the given * zero-relative index. * <p> * Note: To add an item at the end of the list, use the * result of calling <code>getItemCount()</code> as the * index or use <code>add(String)</code>. * </p> * * @param string the new item * @param index the index for the item * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the string is null</li> *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list (inclusive)</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> * @exception SWTError <ul> *    <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li> * </ul> * * @see #add(String) */public void add (String string, int index) {	checkWidget ();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	if (index == -1) error (SWT.ERROR_INVALID_RANGE);	TCHAR buffer = new TCHAR (getCodePage (), string, true);	int result = OS.SendMessage (handle, OS.LB_INSERTSTRING, index, buffer);	if (result == OS.LB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);	if (result == OS.LB_ERR) {		int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);		if (0 <= index && index <= count) {			error (SWT.ERROR_ITEM_NOT_ADDED);		} else {			error (SWT.ERROR_INVALID_RANGE);		}	}	if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, true);}/** * Adds the listener to the collection of listeners who will * be notified when the receiver's selection changes, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is called when the selection changes. * <code>widgetDefaultSelected</code> is typically called when an item 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);}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	return OS.CallWindowProc (ListProc, handle, msg, wParam, lParam);}static int checkStyle (int style) {	return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);}public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	int width = 0, height = 0;	if (wHint == SWT.DEFAULT) {		if ((style & SWT.H_SCROLL) != 0) {			width = OS.SendMessage (handle, OS.LB_GETHORIZONTALEXTENT, 0, 0);		} else {			int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);			int newFont, oldFont = 0;			int hDC = OS.GetDC (handle);			newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);			if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);			RECT rect = new RECT ();			int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;			int cp = getCodePage ();			TCHAR buffer = new TCHAR (cp, 64 + 1);			for (int i=0; i<count; i++) {				int length = OS.SendMessage (handle, OS.LB_GETTEXTLEN, i, 0);				if (length != OS.LB_ERR) {					if (length + 1 > buffer.length ()) {						buffer = new TCHAR (cp, length + 1);					}					int result = OS.SendMessage (handle, OS.LB_GETTEXT, i, buffer);					if (result != OS.LB_ERR) {						OS.DrawText (hDC, buffer, length, rect, flags);						width = Math.max (width, rect.right - rect.left);					}				}			}				if (newFont != 0) OS.SelectObject (hDC, oldFont);			OS.ReleaseDC (handle, hDC);		}	}	if (hHint == SWT.DEFAULT) {		int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);		int itemHeight = OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);	 	height = count * itemHeight;	}	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	int border = getBorderWidth ();	width += border * 2 + 3;	height += border * 2;	if ((style & SWT.V_SCROLL) != 0) {		width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);	}	if ((style & SWT.H_SCROLL) != 0) {		height += OS.GetSystemMetrics (OS.SM_CYHSCROLL);	}	return new Point (width, height);}int defaultBackground () {	return OS.GetSysColor (OS.COLOR_WINDOW);}/** * Deselects the items at the given zero-relative indices in the receiver. * If the item at the given zero-relative index in the receiver  * is selected, it is deselected.  If the item at the index * was not selected, it remains deselected. Indices that are out * of range and duplicate indices are ignored. * * @param indices the array of indices for the items to deselect * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the set of indices 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> */public void deselect (int [] indices) {	checkWidget ();	if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);	if (indices.length == 0) return;	if ((style & SWT.SINGLE) != 0) {		int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);		if (oldIndex == OS.LB_ERR) return;		for (int i=0; i<indices.length; i++) {			if (oldIndex == indices [i]) {				OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);				return;			}		}		return;	}	for (int i=0; i<indices.length; i++) {		int index = indices [i];		if (index != -1) {			OS.SendMessage (handle, OS.LB_SETSEL, 0, index);		}	}}/** * Deselects the item at the given zero-relative index in the receiver. * If the item at the index was already deselected, it remains * deselected. Indices that are out of range are ignored. * * @param index the index of the item to deselect * * @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 deselect (int index) {	checkWidget ();	if (index == -1) return;	if ((style & SWT.SINGLE) != 0) {		int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);		if (oldIndex == OS.LB_ERR) return;		if (oldIndex == index) OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);		return;	} 	OS.SendMessage (handle, OS.LB_SETSEL, 0, index);}/** * Deselects the items at the given zero-relative indices in the receiver. * If the item at the given zero-relative index in the receiver  * is selected, it is deselected.  If the item at the index * was not selected, it remains deselected.  The range of the * indices is inclusive. Indices that are out of range are ignored. * * @param start the start index of the items to deselect * @param end the end index of the items to deselect * * @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 deselect (int start, int end) {	checkWidget ();	if (start > end) return;	if ((style & SWT.SINGLE) != 0) {		int oldIndex = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);		if (oldIndex == OS.LB_ERR) return;		if (start <= oldIndex && oldIndex <= end) {			OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);		}		return;	}	/*	* Ensure that at least one item is contained in	* the range from start to end.  Note that when	* start = end, LB_SELITEMRANGEEX deselects the	* item.	*/	int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);	if (start < 0 && end < 0) return;	if (start >= count && end >= count) return;	start = Math.min (count - 1, Math.max (0, start));	end = Math.min (count - 1, Math.max (0, end));	OS.SendMessage (handle, OS.LB_SELITEMRANGEEX, end, start);}/** * Deselects all selected items in the receiver. * * @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 deselectAll () {	checkWidget ();	if ((style & SWT.SINGLE) != 0) {		OS.SendMessage (handle, OS.LB_SETCURSEL, -1, 0);	} else {		OS.SendMessage (handle, OS.LB_SETSEL, 0, -1);	}}/** * Returns the zero-relative index of the item which currently * has the focus in the receiver, or -1 if no item has focus. * * @return the index of the selected item * * @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 getFocusIndex () {	checkWidget ();	int result = OS.SendMessage (handle, OS.LB_GETCARETINDEX, 0, 0);	if (result == 0) {		int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);		if (count == 0) return -1;	}	return result;}/** * Returns the item at the given, zero-relative index in the * receiver. Throws an exception if the index is out of range. * * @param index the index of the item to return * @return the item at the given index *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区在线看| 欧美视频一二三区| 欧美三级日韩在线| 国产精品美女一区二区三区 | 欧美一区二区视频在线观看| 亚洲精品一区二区精华| 天天影视色香欲综合网老头| 成人av资源网站| 久久久久久日产精品| 天天影视涩香欲综合网| 91色在线porny| 国产亚洲女人久久久久毛片| 美腿丝袜亚洲综合| 欧美日本在线观看| 亚洲不卡在线观看| 在线一区二区视频| 日韩码欧中文字| 国产999精品久久久久久| 久久久亚洲综合| 久久91精品久久久久久秒播| 欧美日韩成人在线| 亚洲午夜电影在线观看| 91久久精品网| 亚洲国产日日夜夜| 欧美日韩免费一区二区三区| 夜色激情一区二区| 在线看国产一区| 午夜一区二区三区在线观看| 欧美日韩精品电影| 五月激情综合色| 欧美一区二区视频网站| 免费av网站大全久久| 91精品综合久久久久久| 青青草成人在线观看| 日韩欧美一二区| 黄色小说综合网站| 日本一区二区成人| 99re热视频这里只精品| 亚洲曰韩产成在线| 欧美人成免费网站| 蜜臀av一级做a爰片久久| 亚洲精品在线网站| 国产白丝精品91爽爽久久| 中文字幕精品三区| 色综合久久久久| 亚洲国产裸拍裸体视频在线观看乱了 | 国产午夜亚洲精品午夜鲁丝片| 精品亚洲成av人在线观看| 久久一区二区三区国产精品| 国产99久久久精品| 亚洲激情av在线| 日韩三级在线观看| 99在线精品一区二区三区| 亚洲高清免费一级二级三级| 91精品综合久久久久久| 国产成人av福利| 亚洲一区在线观看免费观看电影高清| 欧美精品1区2区| 国产精品一区免费在线观看| 亚洲欧美日韩在线| 91精品国产一区二区三区蜜臀| 国产一区高清在线| 亚洲色图20p| 日韩欧美黄色影院| 91视视频在线直接观看在线看网页在线看| 一区二区不卡在线播放| 精品国产伦理网| 91女人视频在线观看| 久草精品在线观看| 亚洲精品成人精品456| 欧美mv和日韩mv的网站| 91免费版在线| 国产在线精品一区二区夜色 | 26uuuu精品一区二区| 92精品国产成人观看免费| 日本不卡在线视频| 亚洲欧美精品午睡沙发| 欧美成人a∨高清免费观看| 一本大道久久a久久综合婷婷| 卡一卡二国产精品| 亚洲高清久久久| 日本一区二区免费在线| 欧美一区二区福利在线| 色猫猫国产区一区二在线视频| 麻豆国产欧美一区二区三区| 亚洲免费在线观看| 国产日韩精品一区| 欧美一区二区精美| 欧美日韩国产综合一区二区| 成人av免费观看| 国产v日产∨综合v精品视频| 亚洲主播在线播放| 亚洲色图欧美偷拍| 国产精品乱人伦中文| 久久久噜噜噜久久人人看| 777色狠狠一区二区三区| 日本韩国一区二区| 99视频精品免费视频| 国产精一品亚洲二区在线视频| 欧美aaaaaa午夜精品| 午夜视频在线观看一区二区| 一区二区欧美在线观看| 亚洲色图视频网| 亚洲色图欧美在线| 国产精品福利在线播放| 日本一区二区电影| 亚洲国产电影在线观看| 中文无字幕一区二区三区| 国产丝袜欧美中文另类| 久久久久久久久一| 国产午夜精品一区二区三区嫩草 | 精品污污网站免费看| 日本道精品一区二区三区| 日本乱码高清不卡字幕| 色综合久久久久网| 欧美日韩在线不卡| 欧美疯狂做受xxxx富婆| 欧美一级理论片| 日韩欧美视频一区| 2020国产精品| 日本一区二区在线不卡| 成人欧美一区二区三区白人 | 欧美国产一区在线| 日本一区二区成人在线| 亚洲同性同志一二三专区| 亚洲欧美激情小说另类| 香蕉久久夜色精品国产使用方法 | 久久91精品久久久久久秒播| 精品亚洲国内自在自线福利| 精品在线播放午夜| 成人免费电影视频| 色呦呦国产精品| 制服丝袜一区二区三区| 久久综合色8888| 成人欧美一区二区三区在线播放| 夜夜操天天操亚洲| 麻豆精品视频在线观看视频| 国产成人综合精品三级| 91小视频免费看| 在线播放91灌醉迷j高跟美女| 日韩美女一区二区三区| 国产精品免费视频观看| 午夜日韩在线电影| 国产精品综合二区| 在线观看日韩国产| 欧美刺激午夜性久久久久久久| 久久夜色精品国产欧美乱极品| 中文字幕一区不卡| 奇米色一区二区三区四区| 成人福利视频网站| 欧美日韩一级二级| 亚洲国产精品v| 日韩va欧美va亚洲va久久| 高清不卡在线观看| 91精品福利在线一区二区三区 | 午夜精品福利视频网站| 精品一区二区三区免费观看| 在线免费观看视频一区| 久久久噜噜噜久久中文字幕色伊伊 | 蜜臂av日日欢夜夜爽一区| av成人免费在线观看| 日韩久久免费av| 有码一区二区三区| 国产精品996| 91.com在线观看| 亚洲人成精品久久久久| 久久99国产精品免费| 欧美日韩国产高清一区二区 | 欧美激情一区在线| 天天av天天翘天天综合网色鬼国产| 99re在线精品| 欧美韩国日本一区| 国产在线视频一区二区| 欧美一级片在线观看| 亚洲一区在线视频观看| www.成人网.com| 国产日韩三级在线| 激情综合网av| 精品国产免费人成在线观看| 亚洲国产成人高清精品| 99久久精品国产一区二区三区 | 亚洲电影视频在线| 91在线国产观看| 国产精品免费看片| 成人免费福利片| 国产精品久久久久毛片软件| 国产一区二区三区日韩| 欧美精品一区二| 久久成人精品无人区| 欧美精品高清视频| 夜夜精品浪潮av一区二区三区| 99精品国产一区二区三区不卡| 欧美极品美女视频| 国产精品88av| 国产精品久久久久三级| 91色九色蝌蚪| 一区二区三区在线视频免费| 欧美性大战久久久久久久| 一区二区三区国产精品| 欧美少妇一区二区|