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

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

?? tableeditor.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * Copyright (c) 2000, 2003 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 TableEditor is a manager for a Control that appears above a cell in a Table and tracks with the* moving and resizing of that cell.  It can be used to display a text widget above a cell* in a Table so that the user can edit the contents of that cell.  It can also be used to display* a button that can launch a dialog for modifying the contents of the associated cell.** <p> Here is an example of using a TableEditor:* <code><pre>*	final Table table = new Table(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION);*	TableColumn column1 = new TableColumn(table, SWT.NONE);*	TableColumn column2 = new TableColumn(table, SWT.NONE);*	for (int i = 0; i &lt 10; i++) {*		TableItem item = new TableItem(table, SWT.NONE);*		item.setText(new String[] {"item " + i, "edit this value"});*	}*	column1.pack();*	column2.pack();*	*	final TableEditor editor = new TableEditor(table);*	//The editor must have the same size as the cell and must*	//not be any smaller than 50 pixels.*	editor.horizontalAlignment = SWT.LEFT;*	editor.grabHorizontal = true;*	editor.minimumWidth = 50;*	// editing the second column*	final int EDITABLECOLUMN = 1;*	*	table.addSelectionListener(new SelectionAdapter() {*		public void widgetSelected(SelectionEvent e) {*			// Clean up any previous editor control*			Control oldEditor = editor.getEditor();*			if (oldEditor != null) oldEditor.dispose();*	*			// Identify the selected row*			TableItem item = (TableItem)e.item;*			if (item == null) return;*	*			// The control that will be the editor must be a child of the Table*			Text newEditor = new Text(table, SWT.NONE);*			newEditor.setText(item.getText(EDITABLECOLUMN));*			newEditor.addModifyListener(new ModifyListener() {*				public void modifyText(ModifyEvent e) {*					Text text = (Text)editor.getEditor();*					editor.getItem().setText(EDITABLECOLUMN, text.getText());*				}*			});*			newEditor.selectAll();*			newEditor.setFocus();*			editor.setEditor(newEditor, item, EDITABLECOLUMN);*		}*	});* </pre></code>*/public class TableEditor extends ControlEditor {	Table table;	TableItem item;	int column = -1;	ControlListener columnListener;/*** Creates a TableEditor for the specified Table.** @param table the Table Control above which this editor will be displayed**/public TableEditor (Table table) {	super(table);	this.table = table;		columnListener = new ControlListener() {		public void controlMoved(ControlEvent e){			resize ();		}		public void controlResized(ControlEvent e){			resize ();		}	};		// To be consistent with older versions of SWT, grabVertical defaults to true	grabVertical = true;}Rectangle computeBounds () {	if (item == null || column == -1 || item.isDisposed()) return new Rectangle(0, 0, 0, 0);	Rectangle cell = item.getBounds(column);	Rectangle rect = item.getImageBounds(column);	cell.x = rect.x + rect.width;	cell.width -= rect.width;	Rectangle area = table.getClientArea();	if (cell.x < area.x + area.width) {		if (cell.x + cell.width > area.x + area.width) {			cell.width = area.x + area.width - cell.x;		}	}	Rectangle editorRect = new Rectangle(cell.x, cell.y, minimumWidth, minimumHeight);	if (grabHorizontal) {		editorRect.width = Math.max(cell.width, minimumWidth);	}		if (grabVertical) {		editorRect.height = Math.max(cell.height, minimumHeight);	}		if (horizontalAlignment == SWT.RIGHT) {		editorRect.x += cell.width - editorRect.width;	} else if (horizontalAlignment == SWT.LEFT) {		// do nothing - cell.x is the right answer	} else { // default is CENTER		editorRect.x += (cell.width - editorRect.width)/2;	}		if (verticalAlignment == SWT.BOTTOM) {		editorRect.y += cell.height - editorRect.height;	} else if (verticalAlignment == SWT.TOP) {		// do nothing - cell.y is the right answer	} else { // default is CENTER		editorRect.y += (cell.height - editorRect.height)/2;	}	return editorRect;}/** * Removes all associations between the TableEditor and the cell in the table.  The * Table and the editor Control are <b>not</b> disposed. */public void dispose () {	if (this.column > -1 && this.column < table.getColumnCount()){		TableColumn tableColumn = table.getColumn(this.column);		tableColumn.removeControlListener(columnListener);	}	columnListener = null;	table = null;	item = null;	column = -1;		super.dispose();}/*** Returns the zero based index of the column of the cell being tracked by this editor.** @return the zero based index of the column of the cell being tracked by this editor*/public int getColumn () {	return column;}/*** Returns the TableItem for the row of the cell being tracked by this editor.** @return the TableItem for the row of the cell being tracked by this editor*/public TableItem getItem () {	return item;}public void setColumn(int column) {	int columnCount = table.getColumnCount();	// Separately handle the case where the table has no TableColumns.	// In this situation, there is a single default column.	if (columnCount == 0) {		this.column = (column == 0) ? 0 : -1;		resize();		return;	}	if (this.column > -1 && this.column < columnCount){		TableColumn tableColumn = table.getColumn(this.column);		tableColumn.removeControlListener(columnListener);		this.column = -1;	}	if (column < 0  || column >= table.getColumnCount()) return;				this.column = column;	TableColumn tableColumn = table.getColumn(this.column);	tableColumn.addControlListener(columnListener);	resize();}public void setItem (TableItem item) {		this.item = item;	resize();}/*** Specify the Control that is to be displayed and the cell in the table that it is to be positioned above.** <p>Note: The Control provided as the editor <b>must</b> be created with its parent being the Table control* specified in the TableEditor constructor.* * @param editor the Control that is displayed above the cell being edited* @param item the TableItem for the row of the cell being tracked by this editor* @param column the zero based index of the column of the cell being tracked by this editor*/public void setEditor (Control editor, TableItem item, int column) {	setItem(item);	setColumn(column);	setEditor(editor);}void resize () {	if (table.isDisposed()) return;	if (item == null || item.isDisposed()) return;	int columnCount = table.getColumnCount();	if (columnCount == 0 && column != 0) return;	if (columnCount > 0 && (column < 0 || column >= columnCount)) return;	super.resize();}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美综合视频在线观看| 成人污视频在线观看| 自拍偷拍亚洲综合| 国产三区在线成人av| 欧美精品一区二区三区四区 | 丝袜亚洲另类丝袜在线| 亚洲日本成人在线观看| 中文字幕一区三区| 中文字幕一区二区三区在线不卡 | 免费观看在线色综合| 蜜桃视频一区二区三区在线观看| 亚洲444eee在线观看| 日韩精品午夜视频| 激情丁香综合五月| 国产最新精品精品你懂的| 国产成人免费9x9x人网站视频| 成人综合婷婷国产精品久久蜜臀| 91在线你懂得| 欧美性色综合网| 精品少妇一区二区三区| 国产精品久久久久久久久免费桃花| 亚洲国产经典视频| 夜色激情一区二区| 狠狠狠色丁香婷婷综合久久五月| 国产精品99久| 欧美三区在线视频| 日韩欧美一卡二卡| 国产精品久久久一本精品| 亚洲成人激情av| 国产精品影视网| 欧美日韩亚洲高清一区二区| 日韩亚洲欧美在线| 亚洲日本中文字幕区| 精品无人码麻豆乱码1区2区| 国产福利视频一区二区三区| 欧洲视频一区二区| 精品国产精品网麻豆系列| 自拍偷拍亚洲综合| 极品少妇一区二区| 在线中文字幕不卡| 欧美激情一二三区| 六月婷婷色综合| 色久综合一二码| 欧美精品一区二区三区在线 | 亚洲欧美日韩综合aⅴ视频| 亚洲成人1区2区| 丁香激情综合五月| 日韩视频一区二区三区在线播放 | 欧美精品一区在线观看| 亚洲欧美激情小说另类| 韩日av一区二区| 欧美猛男gaygay网站| 最新高清无码专区| 国产精品一区三区| 日韩欧美国产三级| 午夜精品福利在线| 色婷婷国产精品| 国产精品日韩成人| 国产黄色成人av| 26uuu精品一区二区在线观看| 天天操天天干天天综合网| 91在线观看污| 亚洲欧洲av一区二区三区久久| 国产精品影视在线| 国产亚洲一区二区三区| 国产精品99久久久久久久女警 | 欧美变态tickle挠乳网站| 亚洲综合丝袜美腿| 欧美主播一区二区三区| 自拍偷拍欧美精品| 色综合久久久久综合体| 亚洲欧洲精品一区二区精品久久久| 国产999精品久久久久久绿帽| 久久久www成人免费毛片麻豆 | 欧美日韩一卡二卡三卡 | 欧美三电影在线| 亚洲综合男人的天堂| 色婷婷精品久久二区二区蜜臀av| 一区二区三区日韩在线观看| 91免费版在线看| 亚洲在线中文字幕| 宅男噜噜噜66一区二区66| 日韩电影在线免费看| 日韩免费高清av| 国产高清在线观看免费不卡| 久久久国产一区二区三区四区小说| 国产91精品露脸国语对白| 亚洲欧美自拍偷拍色图| 色婷婷久久久综合中文字幕| 午夜欧美大尺度福利影院在线看| 69精品人人人人| 狠狠网亚洲精品| 亚洲人成亚洲人成在线观看图片| 日本乱人伦aⅴ精品| 五月激情综合色| 精品国产乱码久久久久久闺蜜| 高清在线不卡av| 一区二区三区成人在线视频| 欧美放荡的少妇| 成人精品亚洲人成在线| 亚洲一区二区欧美激情| 欧美v日韩v国产v| zzijzzij亚洲日本少妇熟睡| 一区二区三区色| 精品久久久久久久久久久久包黑料| 成人高清在线视频| 日韩高清在线一区| 国产精品午夜在线| 欧美精品黑人性xxxx| 不卡的av电影| 蜜臀av性久久久久av蜜臀妖精| 国产精品萝li| 欧美成人猛片aaaaaaa| 一本高清dvd不卡在线观看| 秋霞电影一区二区| 亚洲精品免费在线| 久久久久久日产精品| 欧美日韩一区二区在线视频| 国产福利一区在线| 裸体在线国模精品偷拍| 亚洲欧美一区二区久久| 久久人人爽爽爽人久久久| 欧美三级视频在线播放| 不卡高清视频专区| 国产精品一区二区免费不卡 | 国产做a爰片久久毛片| 一区二区欧美国产| 国产精品久久久久久亚洲毛片| 欧美一卡二卡在线| 欧美性生活影院| 色综合一个色综合亚洲| 国产大陆a不卡| 极品少妇xxxx偷拍精品少妇| 亚洲午夜一区二区三区| 亚洲免费av高清| 中文字幕综合网| 亚洲天堂精品在线观看| 欧美高清在线精品一区| 国产欧美一区视频| 久久久91精品国产一区二区精品| 欧美一区二区三区系列电影| 精品视频一区三区九区| 久久精品夜夜夜夜久久| 精品日产卡一卡二卡麻豆| 欧美一区二区视频观看视频| 91精品国产色综合久久ai换脸| 欧美日韩亚洲综合在线 | 欧美性一二三区| 色综合久久久久综合体| 91麻豆国产自产在线观看| 成人av电影在线网| 成人激情视频网站| 99久久精品99国产精品| 99久久久久免费精品国产 | 欧美高清你懂得| 91高清在线观看| 欧美日韩国产bt| 91精品国产黑色紧身裤美女| 91精品在线观看入口| 91精选在线观看| 26uuu另类欧美亚洲曰本| 久久久三级国产网站| 国产精品久久久久久久久免费丝袜 | 国产一二精品视频| 国产成人在线视频网站| 成人av资源站| 在线亚洲高清视频| 911精品国产一区二区在线| 欧美一级欧美三级| 国产午夜精品在线观看| 最新日韩av在线| 午夜影院久久久| 久久99精品国产麻豆不卡| 福利一区二区在线| 一本到一区二区三区| 宅男噜噜噜66一区二区66| 久久久久久久久久久久久女国产乱| 中文字幕一区二区三区在线不卡 | 91精品国产91久久综合桃花| 欧美成人aa大片| 中文字幕字幕中文在线中不卡视频| 一区二区三区资源| 久久精品国产亚洲aⅴ| 成人丝袜18视频在线观看| 欧美日韩一区在线观看| 日韩欧美亚洲国产另类| 国产精品传媒入口麻豆| 午夜精品福利视频网站| 风间由美性色一区二区三区| 欧美日韩大陆一区二区| 国产视频视频一区| 日韩不卡免费视频| av毛片久久久久**hd| 日韩欧美一区二区久久婷婷| 日韩毛片高清在线播放| 国产在线精品一区二区三区不卡| 91免费小视频| 国产日韩欧美亚洲| 日本aⅴ免费视频一区二区三区| 99久久久无码国产精品|