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

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

?? tabletreeeditor.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.graphics.*;import org.eclipse.swt.widgets.*;import org.eclipse.swt.events.*;/**** A TableTreeEditor is a manager for a Control that appears above a cell in a TableTree* and tracks with the moving and resizing of that cell.  It can be used to display a* text widget above a cell in a TableTree 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 TableTreeEditor:* <code><pre>*	final TableTree tableTree = new TableTree(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION);*	final Table table = tableTree.getTable();*	TableColumn column1 = new TableColumn(table, SWT.NONE);*	TableColumn column2 = new TableColumn(table, SWT.NONE);*	for (int i = 0; i &lt 10; i++) {*		TableTreeItem item = new TableTreeItem(tableTree, SWT.NONE);*		item.setText(0, "item " + i);*		item.setText(1, "edit this value");*		for (int j = 0; j &lt 3; j++) {*			TableTreeItem subitem = new TableTreeItem(item, SWT.NONE);*			subitem.setText(0, "subitem " + i + " " + j);*			subitem.setText(1, "edit this value");*		}*	}*	column1.setWidth(100);*	column2.pack();*	*	final TableTreeEditor editor = new TableTreeEditor(tableTree);*	//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;*	*	tableTree.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*			TableTreeItem item = (TableTreeItem)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 TableTreeEditor extends ControlEditor {	TableTree tableTree;	TableTreeItem item;	int column = -1;	ControlListener columnListener;	TreeListener treeListener;/*** Creates a TableTreeEditor for the specified TableTree.** @param tableTree the TableTree Control above which this editor will be displayed**/public TableTreeEditor (TableTree tableTree) {	super(tableTree.getTable());	this.tableTree = tableTree;	treeListener = new TreeListener () {		final Runnable runnable = new Runnable() {			public void run() {				if (editor == null || editor.isDisposed()) return;				if (TableTreeEditor.this.tableTree.isDisposed()) return;				resize();				editor.setVisible(true);			}		};		public void treeCollapsed(TreeEvent e) {			if (editor == null || editor.isDisposed ()) return;			Display display = TableTreeEditor.this.tableTree.getDisplay();			editor.setVisible(false);			display.asyncExec(runnable);		}		public void treeExpanded(TreeEvent e) {			if (editor == null || editor.isDisposed ()) return;			Display display = TableTreeEditor.this.tableTree.getDisplay();			editor.setVisible(false);			display.asyncExec(runnable);		}	};	tableTree.addTreeListener(treeListener);		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() || item.tableItem == null) return new Rectangle(0, 0, 0, 0);	Rectangle cell = item.getBounds(column);	Rectangle area = tableTree.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 TableTreeEditor and the cell in the table tree.  The * TableTree and the editor Control are <b>not</b> disposed. */public void dispose () {	if (treeListener != null) 		tableTree.removeTreeListener(treeListener);	treeListener = null;		Table table = tableTree.getTable();	if (this.column > -1 && this.column < table.getColumnCount()){		TableColumn tableColumn = table.getColumn(this.column);		tableColumn.removeControlListener(columnListener);	}	tableTree = 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 TableTreeItem for the row of the cell being tracked by this editor.** @return the TableTreeItem for the row of the cell being tracked by this editor*/public TableTreeItem getItem () {	return item;}public void setColumn(int column) {	Table table = tableTree.getTable();	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 (TableTreeItem 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, TableTreeItem item, int column) {	setItem(item);	setColumn(column);	setEditor(editor);}void resize () {	if (tableTree.isDisposed()) return;	if (item == null || item.isDisposed()) return;	Table table = tableTree.getTable();	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一区二区三区免费野_久草精品视频
国产精品麻豆网站| 丝袜亚洲精品中文字幕一区| 亚洲综合免费观看高清在线观看| 天天射综合影视| 成人激情免费电影网址| 3atv一区二区三区| 亚洲色大成网站www久久九九| 日韩精品一卡二卡三卡四卡无卡 | 国产精品国产三级国产有无不卡 | 97精品国产97久久久久久久久久久久 | 成人av中文字幕| 欧美电影免费观看高清完整版在 | 国产精品久久二区二区| 日本不卡123| 欧美日韩在线免费视频| 一区在线观看免费| 懂色中文一区二区在线播放| 日韩免费成人网| 亚洲一区二区三区小说| 99精品国产热久久91蜜凸| 国产欧美日韩另类一区| 国产在线精品国自产拍免费| 欧美亚洲国产一区二区三区va| 国产精品久久久久久久久免费相片 | 久久众筹精品私拍模特| 丝袜a∨在线一区二区三区不卡| 日本国产一区二区| 亚洲精品ww久久久久久p站| 92精品国产成人观看免费| 国产农村妇女精品| 成人一二三区视频| 国产精品天天摸av网| 国产黄色91视频| 国产亚洲一二三区| 丰满亚洲少妇av| 国产精品久久久久aaaa樱花 | 亚洲影院久久精品| 欧美在线观看一区| 午夜欧美视频在线观看 | 色婷婷国产精品| 亚洲综合久久av| 欧美日韩国产在线观看| 偷拍日韩校园综合在线| 日韩一区二区三区免费观看| 免费的成人av| 国产性做久久久久久| 99久久婷婷国产综合精品电影| 亚洲精选视频免费看| 日本精品裸体写真集在线观看 | 亚洲精品综合在线| 欧美绝品在线观看成人午夜影视| 香蕉久久夜色精品国产使用方法 | 亚洲成人自拍偷拍| 日韩一区二区免费视频| 国产麻豆精品久久一二三| 欧美激情一区二区三区全黄| 91论坛在线播放| 午夜电影一区二区| 久久夜色精品一区| 99re视频精品| 日韩影院在线观看| 国产精品久久久久久亚洲伦 | 91女厕偷拍女厕偷拍高清| 亚洲超丰满肉感bbw| 欧美videofree性高清杂交| 成人一区二区视频| 偷拍一区二区三区| 国产精品电影一区二区| 欧美精品tushy高清| 福利一区二区在线| 午夜精品久久久久久久蜜桃app| 精品国产免费一区二区三区香蕉| 99视频在线精品| 喷水一区二区三区| 亚洲免费高清视频在线| 日韩一区二区三| 色狠狠综合天天综合综合| 奇米影视一区二区三区| 一区二区三区美女视频| 精品电影一区二区| 精品视频一区二区不卡| 成人午夜av电影| 免费在线观看一区二区三区| 中文字幕va一区二区三区| 欧美高清激情brazzers| 成人午夜免费av| 毛片基地黄久久久久久天堂| 亚洲色图视频网站| 久久久久99精品一区| 7777精品伊人久久久大香线蕉经典版下载| 高清成人在线观看| 韩国毛片一区二区三区| 日日嗨av一区二区三区四区| 亚洲精品综合在线| 综合久久一区二区三区| 色国产精品一区在线观看| 男男成人高潮片免费网站| 亚洲欧洲成人精品av97| 日韩精品一区二区三区视频播放 | 久久se这里有精品| 亚洲最快最全在线视频| 国产精品色哟哟网站| 久久久一区二区| 69p69国产精品| 精品亚洲aⅴ乱码一区二区三区| 亚洲欧美成aⅴ人在线观看 | 日韩精品一区二区三区四区视频 | 亚洲第一精品在线| 一级日本不卡的影视| 中文字幕中文字幕中文字幕亚洲无线| 亚洲精品一区在线观看| 欧美成人综合网站| 日韩精品一区二区三区在线观看 | 国产一区二区伦理| 免费观看在线色综合| 日韩福利电影在线观看| 天天综合日日夜夜精品| 午夜精品福利在线| 免费成人在线网站| 美女网站在线免费欧美精品| 久久国产精品免费| 国产原创一区二区| 国产老女人精品毛片久久| 国产毛片精品一区| 成人av在线影院| 色综合久久久久综合体| 欧美性色综合网| 欧美一区欧美二区| 久久青草欧美一区二区三区| 欧美激情在线免费观看| 亚洲精品福利视频网站| 亚洲国产cao| 美女网站视频久久| 成人免费视频一区| 色综合久久久久综合体桃花网| 欧美亚洲综合一区| 日韩无一区二区| 久久精品夜色噜噜亚洲a∨| 中文字幕一区二区三区精华液| 亚洲美腿欧美偷拍| 日韩成人dvd| 国产精品一区二区三区网站| 色综合天天综合在线视频| 91精品啪在线观看国产60岁| 精品88久久久久88久久久| 国产精品久久国产精麻豆99网站| 亚洲综合在线五月| 欧洲视频一区二区| 99久久免费精品高清特色大片| 在线国产亚洲欧美| 精品毛片乱码1区2区3区| 中文字幕av资源一区| 亚洲福利电影网| 国产精品性做久久久久久| 在线观看91av| 国产拍欧美日韩视频二区| 亚洲综合男人的天堂| 国产精品乡下勾搭老头1| 欧美日韩亚洲不卡| 欧美极品aⅴ影院| 青青草一区二区三区| 成人黄色小视频在线观看| 欧美日韩一二区| 久久久国产精品午夜一区ai换脸| 亚洲国产综合色| 国产成人免费av在线| 欧美精品日日鲁夜夜添| 国产亚洲欧美激情| 丝袜a∨在线一区二区三区不卡| 国产69精品久久久久毛片| 欧美一区二区三区在线观看| 亚洲日本va午夜在线影院| 精品一区二区三区蜜桃| 成+人+亚洲+综合天堂| 极品少妇一区二区三区精品视频| 一级精品视频在线观看宜春院 | 中文字幕一区av| 美女网站一区二区| 欧美日韩精品欧美日韩精品一| 国产精品五月天| 国产一区二区三区国产| 日韩欧美色综合网站| 亚洲亚洲精品在线观看| 91麻豆.com| 成人欧美一区二区三区小说| 国产成人精品影院| 久久中文娱乐网| 激情伊人五月天久久综合| 51久久夜色精品国产麻豆| 亚洲一区二区精品久久av| av激情亚洲男人天堂| 欧美激情自拍偷拍| 国产一区 二区| 精品三级在线看| 免费观看久久久4p| 欧美videossexotv100| 久久66热re国产| 精品理论电影在线观看| 久久精品国产免费| 欧美大片免费久久精品三p |