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

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

?? popuplist.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.custom;import org.eclipse.swt.*;import org.eclipse.swt.events.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.widgets.*;/*** A PopupList is a list of selectable items that appears in its own shell positioned above* its parent shell.  It it used for selecting items when editing a Table cell (similar to the* list that appears when you open a Combo box).** The list will be positioned so that does not run off the screen and the largest number of items* are visible.  It may appear above the current cursor location or below it depending how close you * are to the edge of the screen.*/public class PopupList {	Shell  shell;	List   list;	int    minimumWidth;/** * Creates a PopupList above the specified shell.* * @param parent a Shell control which will be the parent of the new instance (cannot be null)*/public PopupList(Shell parent) {	this (parent, 0);}/** * Creates a PopupList above the specified shell.* * @param parent a widget which will be the parent of the new instance (cannot be null)* @param style the style of widget to construct* * @since 3.0 */public PopupList(Shell parent, int style) {	shell = new Shell(parent, checkStyle(style));		list = new List(shell, SWT.SINGLE | SWT.V_SCROLL);		// close dialog if user selects outside of the shell	shell.addListener(SWT.Deactivate, new Listener() {		public void handleEvent(Event e){				shell.setVisible (false);		}	});		// resize shell when list resizes	shell.addControlListener(new ControlListener() {		public void controlMoved(ControlEvent e){}		public void controlResized(ControlEvent e){			Rectangle shellSize = shell.getClientArea();			list.setSize(shellSize.width, shellSize.height);		}	});		// return list selection on Mouse Up or Carriage Return	list.addMouseListener(new MouseListener() {		public void mouseDoubleClick(MouseEvent e){}		public void mouseDown(MouseEvent e){}		public void mouseUp(MouseEvent e){			shell.setVisible (false);		}	});	list.addKeyListener(new KeyListener() {		public void keyReleased(KeyEvent e){}		public void keyPressed(KeyEvent e){			if (e.character == '\r'){				shell.setVisible (false);			}		}	});	}private static int checkStyle (int style) {	int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;	return style & mask;}/*** Gets the widget font.* <p>* @return the widget font** @exception SWTError <ul>*		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>*		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>*	</ul>*/public Font getFont () {	return list.getFont();}/*** Gets the items.* <p>* This operation will fail if the items cannot* be queried from the OS.** @return the items in the widget** @exception SWTError <ul>*		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>*		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>* 		<li>ERROR_CANNOT_GET_ITEM when the operation fails</li>*	</ul>*/public String[] getItems () {	return list.getItems();}/*** Gets the minimum width of the list.** @return the minimum width of the list*/public int getMinimumWidth () {	return minimumWidth;}/*** Launches the Popup List, waits for an item to be selected and then closes PopupList.** @param rect the initial size and location of the PopupList; the dialog will be*        positioned so that it does not run off the screen and the largest number of items are visible** @return the text of the selected item or null if no item is selected*/public String open (Rectangle rect) {	Point listSize = list.computeSize (rect.width, SWT.DEFAULT);	Rectangle screenSize = shell.getDisplay().getBounds();	// Position the dialog so that it does not run off the screen and the largest number of items are visible	int spaceBelow = screenSize.height - (rect.y + rect.height) - 30;	int spaceAbove = rect.y - 30;	int y = 0;	if (spaceAbove > spaceBelow && listSize.y > spaceBelow) {		// place popup list above table cell		if (listSize.y > spaceAbove){			listSize.y = spaceAbove;		} else {			listSize.y += 2;		}		y = rect.y - listSize.y;			} else {		// place popup list below table cell		if (listSize.y > spaceBelow){			listSize.y = spaceBelow;		} else {			listSize.y += 2;		}		y = rect.y + rect.height;	}		// Make dialog as wide as the cell	listSize.x = rect.width;	// dialog width should not be les than minimumwidth	if (listSize.x < minimumWidth)		listSize.x = minimumWidth;		// Align right side of dialog with right side of cell	int x = rect.x + rect.width - listSize.x;		shell.setBounds(x, y, listSize.x, listSize.y);		shell.open();	list.setFocus();	Display display = shell.getDisplay();	while (!shell.isDisposed () && shell.isVisible ()) {		if (!display.readAndDispatch()) display.sleep();	}		String result = null;	if (!shell.isDisposed ()) {		String [] strings = list.getSelection ();		shell.dispose();		if (strings.length != 0) result = strings [0];	}	return result;}/*** Selects an item with text that starts with specified String.* <p>* If the item is not currently selected, it is selected.  * If the item at an index is selected, it remains selected.  * If the string is not matched, it is ignored.** @param string the text of the item** @exception SWTError <ul>*		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>*		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>*	</ul>*/public void select(String string) {	String[] items = list.getItems();	// find the first entry in the list that starts with the	// specified string	if (string != null){		for (int i = 0; i < items.length; i++) {			if (items[i].startsWith(string)){				int index = list.indexOf(items[i]);				list.select(index);				break;			}		}	}}/*** Sets the widget font.* <p>* When new font is null, the font reverts* to the default system font for the widget.** @param font the new font (or null)* * @exception SWTError <ul>*		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>*		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>*	</ul>*/public void setFont (Font font) {	list.setFont(font);}/*** Sets all items.* <p>* The previous selection is cleared.* The previous items are deleted.* The new items are added.* The top index is set to 0.** @param strings the array of items** This operation will fail when an item is null* or could not be added in the OS.** @exception SWTError <ul>*		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>*		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>*		<li>ERROR_NULL_ARGUMENT when items is null</li>*		<li>ERROR_ITEM_NOT_ADDED when the operation fails</li>*	</ul>*/public void setItems (String[] strings) {	list.setItems(strings);}/*** Sets the minimum width of the list.** @param width the minimum width of the list*/public void setMinimumWidth (int width) {	if (width < 0)		SWT.error(SWT.ERROR_INVALID_ARGUMENT);			minimumWidth = width;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲资源中文字幕| 中文字幕成人在线观看| 一本到一区二区三区| 不卡av电影在线播放| 99久久精品情趣| 92国产精品观看| 99久久99久久精品免费看蜜桃| 国产成人在线网站| 盗摄精品av一区二区三区| 国产精品一区二区你懂的| 国产成人精品亚洲777人妖| 成人免费av资源| 99久久精品国产导航| 在线视频欧美精品| 欧美三级韩国三级日本三斤| 在线播放视频一区| 欧美电影免费提供在线观看| 久久一区二区三区国产精品| 久久免费国产精品| 成人免费一区二区三区视频 | 丁香天五香天堂综合| 成人在线视频一区| 色老汉一区二区三区| 欧美日韩黄视频| 精品久久久久久最新网址| 国产亚洲成aⅴ人片在线观看 | 色综合久久天天| 欧美日韩在线观看一区二区| 日韩欧美中文一区| 欧美国产一区二区| 香蕉av福利精品导航| 韩国三级中文字幕hd久久精品| 丁香另类激情小说| 51精品国自产在线| 国产精品乱码久久久久久| 一区二区三区在线不卡| 久久精品国产99| 91在线视频18| 欧美成人a在线| 专区另类欧美日韩| 免费在线观看视频一区| 成人免费视频免费观看| 91精品一区二区三区在线观看| 国产午夜精品理论片a级大结局| 一卡二卡三卡日韩欧美| 精品一区二区三区不卡 | 亚洲香蕉伊在人在线观| 国产在线精品视频| 91传媒视频在线播放| 国产欧美视频在线观看| 图片区小说区区亚洲影院| 成人中文字幕电影| 日韩美女天天操| 一区二区三区小说| 国产成人一区二区精品非洲| 欧美高清视频在线高清观看mv色露露十八| 久久综合狠狠综合久久综合88| 亚洲成人免费在线| 色婷婷综合久久久中文字幕| 久久一区二区三区四区| 老司机精品视频一区二区三区| 在线看一区二区| 综合av第一页| 不卡的av电影| 国产精品进线69影院| 国产麻豆一精品一av一免费| 日韩欧美国产一区二区三区| 亚洲午夜久久久久久久久久久 | 久久国内精品视频| 欧美人与z0zoxxxx视频| 一二三四区精品视频| 成人av在线资源网| 亚洲欧洲色图综合| 成人午夜大片免费观看| 国产欧美一区二区精品久导航 | 99re这里只有精品视频首页| 国产精品无遮挡| 成人午夜视频在线| 国产精品久久久久一区二区三区| 国产超碰在线一区| 中文一区在线播放| 国产电影精品久久禁18| 国产欧美一区二区精品久导航| 成人理论电影网| 亚洲欧美日本在线| 色婷婷国产精品综合在线观看| 亚洲免费观看在线视频| 在线视频国内一区二区| 午夜久久久久久电影| 555夜色666亚洲国产免| 韩国精品久久久| 中文字幕二三区不卡| 在线一区二区三区四区五区| 亚洲成av人片在线观看无码| 日韩一区二区电影网| 国产精品99久久久久久似苏梦涵| 中文字幕欧美国产| 91福利国产成人精品照片| 日本欧美加勒比视频| 久久综合色综合88| 91小视频免费观看| 日本 国产 欧美色综合| 久久综合一区二区| 色婷婷综合久久久中文一区二区| 天涯成人国产亚洲精品一区av| 欧美一级欧美一级在线播放| 国产福利一区在线观看| 亚洲精品久久久久久国产精华液| 337p亚洲精品色噜噜狠狠| 国产黄人亚洲片| 一区二区在线观看免费| 欧美一级xxx| 99久久综合精品| 日韩**一区毛片| 中文字幕精品一区二区三区精品 | 婷婷综合在线观看| www久久精品| 精品视频免费看| 成人性生交大片免费看视频在线| 亚洲成人免费影院| 中文字幕制服丝袜成人av| 欧美性生活久久| 粉嫩av一区二区三区粉嫩| 婷婷久久综合九色综合绿巨人 | 欧美午夜宅男影院| 国产成人免费视频网站| 日韩电影在线观看网站| 自拍偷拍亚洲激情| 久久久蜜桃精品| 91精品国产色综合久久ai换脸| 成人97人人超碰人人99| 久久精品国产精品青草| 天天综合天天做天天综合| 中文字幕一区二区三区在线播放| 日韩欧美亚洲一区二区| 欧美在线观看禁18| 99国产欧美另类久久久精品| 国产精品亚洲成人| 久草这里只有精品视频| 日韩电影在线免费观看| 亚洲第一成年网| 亚洲三级在线观看| 国产精品国产馆在线真实露脸| 久久中文娱乐网| 久久久亚洲高清| 久久久欧美精品sm网站| 精品国产三级电影在线观看| 欧美一区二区三区系列电影| 欧美高清视频在线高清观看mv色露露十八 | 精品国产乱码久久久久久影片| 欧美日韩一区二区三区不卡| 色综合激情五月| 99re成人在线| 97se亚洲国产综合自在线不卡| 国产成人在线看| 国产成人免费视频网站高清观看视频 | 免费精品视频最新在线| 男女性色大片免费观看一区二区 | 日韩成人一级大片| 视频在线在亚洲| 日韩1区2区日韩1区2区| 美女一区二区视频| 久久精品久久综合| 国内久久精品视频| 狠狠色狠狠色综合系列| 国产69精品久久久久777| 成人一区二区三区视频| 不卡视频一二三四| 一本大道综合伊人精品热热| 欧美日韩一区二区三区高清| 欧美一级片在线| 国产拍欧美日韩视频二区| 中文字幕一区二区三中文字幕 | 777xxx欧美| 精品少妇一区二区三区| 久久久久综合网| 亚洲欧洲另类国产综合| 亚洲成年人影院| 久久精品国产第一区二区三区| 国产成+人+日韩+欧美+亚洲| 91亚洲国产成人精品一区二区三| 在线观看免费一区| 日韩一区二区不卡| 国产精品久久久久久久久免费樱桃 | 中文久久乱码一区二区| 一区二区三区美女视频| 久久丁香综合五月国产三级网站| 国产精品一线二线三线精华| 在线视频欧美精品| 久久影院午夜论| 亚洲一区二区三区在线看| 久久av中文字幕片| 97久久精品人人做人人爽50路| 欧美久久一区二区| 国产精品久久久久天堂| 日韩av电影天堂| 97aⅴ精品视频一二三区| 日韩精品一区二区三区老鸭窝 | 麻豆一区二区在线| 一本久道久久综合中文字幕|