• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TableCursor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.swt.custom.TableCursor的典型用法代码示例。如果您正苦于以下问题:Java TableCursor类的具体用法?Java TableCursor怎么用?Java TableCursor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TableCursor类属于org.eclipse.swt.custom包,在下文中一共展示了TableCursor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: endTableEdit

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
protected void endTableEdit(TableCursor tableCursor, ControlEditor editor,
        final CommitEditRunnable commitEditRunnable, TableItem row, int column, String newValue) throws Exception {

    if (commitEditRunnable == null) {
        return;
    }

    commitEditRunnable.setTableCursor(tableCursor);
    commitEditRunnable.setEditor(editor);
    commitEditRunnable.setRow(row);
    commitEditRunnable.setColumn(column);
    commitEditRunnable.setNewValue(newValue);

    BusyIndicator.showWhile(row.getDisplay(), commitEditRunnable);

    Exception error = commitEditRunnable.getError();
    if (error != null) {
        throw error;
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:TableEdit.java


示例2: selectAllInTable

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
private void selectAllInTable(TableViewer debugDataViewer, TableCursor tableCursor){
	Table table = debugDataViewer.getTable();
	TableItem[] tableItems = table.getItems();
	int recordCount = 0;
	
	for(int rowIndex = 0; rowIndex < tableItems.length; rowIndex++){
		TableItem tableItem = tableItems[rowIndex];
		for(int colIndex = 1; colIndex <= table.getColumnCount(); colIndex++){
			if(StringUtils.containsIgnoreCase(tableItem.getText(colIndex), findText.getText())){
				label.setVisible(false);
				tableItem.setBackground(colIndex, Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));
				recordCount++;
			}
		}
		findColIndex=1;
	}
	
	findRowIndex = 0;
	findColIndex = 0;
	
	if(recordCount > 0){
		label.setVisible(true);
		label.setText("Match count - " + recordCount);
	}else{ label.setVisible(false); }
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:27,代码来源:FindViewDataDialog.java


示例3: forwardTableTraverse

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
private void forwardTableTraverse(TableViewer debugDataViewer, TableCursor tableCursor){
	TableItem previousSelectedTableItem = null;
	if(debugDataViewer.getData("SELECTED_ROW_INDEX")!=null){
		previousSelectedTableItem = debugDataViewer.getTable().getItem((int) debugDataViewer.getData("SELECTED_ROW_INDEX"));
		findColIndex++;
	}
	Table table = debugDataViewer.getTable();
	TableItem[] tableItems = table.getItems();
	if(findColIndex == prevColSelection && findRowIndex == prevRowSelection){
		findColIndex++;
	}
	if(findRowIndex < 0){
		findRowIndex = 0;
	}
	for(;findRowIndex<tableItems.length;){
		TableItem tableItem = tableItems[findRowIndex];
		for(;findColIndex <= table.getColumnCount();findColIndex++){
			if(StringUtils.containsIgnoreCase(tableItem.getText(findColIndex), findText.getText())){
				if(prevColSelection > 0){
					previousSelectedTableItem.setBackground(prevColSelection, Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
				}
				label.setVisible(false);
				table.showItem(tableItem);
				table.showColumn(table.getColumn(findColIndex));
				tableCursor.setSelection(findRowIndex, findColIndex);
				tableCursor.setVisible(false);
				tableItem.setBackground(findColIndex, Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));
				debugDataViewer.setData("SELECTED_ROW_INDEX", findRowIndex);
				debugDataViewer.setData("SEELCTED_COLUMN_INDEX", findColIndex);
				prevColSelection = findColIndex;
				return;
			}
		}
		findRowIndex++;
		findColIndex=1;
		if(findRowIndex >= tableItems.length){ findRowIndex = 0;}
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:39,代码来源:FindViewDataDialog.java


示例4: reverseTableTraverse

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
private void reverseTableTraverse(TableViewer debugDataViewer, TableCursor tableCursor){
	TableItem previousSelectedTableItem = null;
	if(debugDataViewer.getData("SELECTED_ROW_INDEX")!=null){
		previousSelectedTableItem = debugDataViewer.getTable().getItem((int) debugDataViewer.getData("SELECTED_ROW_INDEX"));
		findColIndex -= 1;
	}
	if(findRowIndex < 0){
		findRowIndex = debugDataViewer.getTable().getItems().length - 1;
	}
	Table table = debugDataViewer.getTable();
	TableItem[] tableItems = table.getItems();
	for(; findRowIndex >=0; findRowIndex--){
		TableItem tableItem = tableItems[findRowIndex];
		for( ; findColIndex > 0 ;findColIndex--){
			if(StringUtils.containsIgnoreCase(tableItem.getText(findColIndex), findText.getText())){
				if(prevColSelection > 0){
					previousSelectedTableItem.setBackground(prevColSelection, Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
				}
				label.setVisible(false);
				table.showItem(tableItem);
				table.showColumn(table.getColumn(findColIndex));
				tableCursor.setSelection(findRowIndex, findColIndex);
				tableCursor.setVisible(false);
				tableItem.setBackground(findColIndex,Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));
				if(findColIndex<=0){debugDataViewer.setData("SELECTED_ROW_INDEX", findRowIndex-1);}else{
					debugDataViewer.setData("SELECTED_ROW_INDEX", findRowIndex);
				}
				debugDataViewer.setData("SEELCTED_COLUMN_INDEX", findColIndex);
				prevColSelection = findColIndex;
				prevRowSelection = findRowIndex;
				return ;
			}
			
		}
		if(findColIndex <= 0){ findColIndex = table.getColumnCount();}
		if(findRowIndex == 0){ findRowIndex = tableItems.length; }
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:39,代码来源:FindViewDataDialog.java


示例5: create

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
static SelectionAdapter create(Widget widget) {
	if (widget instanceof Button) {
		return create((Button) widget);
	} else if (widget instanceof CCombo) {
		return create((CCombo) widget);
	} else if (widget instanceof Combo) {
		return create((Combo) widget);
	} else if (widget instanceof CoolItem) {
		return create((CoolItem) widget);
	} else if (widget instanceof CTabFolder) {
		return create((CTabFolder) widget);
	} else if (widget instanceof DateTime) {
		return create((DateTime) widget);
	} else if (widget instanceof Link) {
		return create((Link) widget);
	} else if (widget instanceof List) {
		return create((List) widget);
	} else if (widget instanceof MenuItem) {
		return create((MenuItem) widget);
	} else if (widget instanceof Sash) {
		return create((Sash) widget);
	} else if (widget instanceof Scale) {
		return create((Scale) widget);
	} else if (widget instanceof Slider) {
		return create((Slider) widget);
	} else if (widget instanceof Spinner) {
		return create((Spinner) widget);
	} else if (widget instanceof StyledText) {
		return create((StyledText) widget);
	} else if (widget instanceof TabFolder) {
		return create((TabFolder) widget);
	} else if (widget instanceof Table) {
		return create((Table) widget);
	} else if (widget instanceof TableColumn) {
		return create((TableColumn) widget);
	} else if (widget instanceof TableCursor) {
		return create((TableCursor) widget);
	} else if (widget instanceof Text) {
		return create((Text) widget);
	} else if (widget instanceof ToolItem) {
		return create((ToolItem) widget);
	} else if (widget instanceof ToolTip) {
		return create((ToolTip) widget);
	} else if (widget instanceof TrayItem) {
		return create((TrayItem) widget);
	} else if (widget instanceof Tree) {
		return create((Tree) widget);
	} else if (widget instanceof TreeColumn) {
		return create((TreeColumn) widget);
	} else if (widget instanceof TreeCursor) {
		return create((TreeCursor) widget);
	}

	throw new IllegalArgumentException("The given widget (" + widget.getClass().getName() + ") is not supported.");
}
 
开发者ID:SimonScholz,项目名称:RxSWT,代码行数:56,代码来源:SelectionAdapter.java


示例6: getTablecursor

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
public TableCursor getTablecursor(){
	return tableCursor;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:4,代码来源:DebugDataViewer.java


示例7: editCell

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
/**
 * @param tableViewer
 * @param cursor
 */
static void editCell(final TableViewer tableViewer, final TableCursor cursor) {
	tableViewer.editElement(cursor.getRow().getData(), cursor.getColumn());
	// hide cursor only f there is an editor active on the cell
	cursor.setVisible(!tableViewer.isCellEditorActive());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:ParameterPage.java


示例8: getTableCursor

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
/**
 * Returns the tableCursor.
 * 
 * @return The tableCursor
 */
public TableCursor getTableCursor() {
    return _TableCursor;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:9,代码来源:TableEdit.java


示例9: setTableCursor

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
/**
 * Sets the tableCursor.
 * 
 * @param tableCursor the tableCursor to set
 */
public void setTableCursor(TableCursor tableCursor) {
    _TableCursor = tableCursor;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:9,代码来源:TableEdit.java


示例10: getTableCursor

import org.eclipse.swt.custom.TableCursor; //导入依赖的package包/类
/**
 * If usesTableCursor was passed into the constructor then this will return
 * the table cursor. Otherwise it will return null.
 */
public TableCursor getTableCursor() {
	return cursor;
}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:8,代码来源:RaptorTable.java



注:本文中的org.eclipse.swt.custom.TableCursor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Vec3Pool类代码示例发布时间:2022-05-22
下一篇:
Java ServerConfig类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap