当前位置: 首页>>代码示例>>Java>>正文


Java TableEditor.setEditor方法代码示例

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


在下文中一共展示了TableEditor.setEditor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addTextBoxInTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private Text addTextBoxInTable(TableViewer tableViewer, TableItem tableItem, String textBoxName, 
		String valueTextPane, String editorName, int columnIndex, Listener listener) {
	final Composite buttonPane = new Composite(tableViewer.getTable(), SWT.NONE);
	buttonPane.setLayout(new FillLayout());
	final Text text = new Text(buttonPane, SWT.NONE);
	text.addListener(SWT.Modify, listener);
	text.setData(FilterConstants.ROW_INDEX, tableViewer.getTable().indexOf(tableItem));
	tableItem.setData(textBoxName, text);
	tableItem.setData(valueTextPane, buttonPane);
	//text.addModifyListener(FilterHelper.INSTANCE.getTextModifyListener());
	
	final TableEditor editor = new TableEditor(tableViewer.getTable());
	editor.grabHorizontal = true;
	editor.grabVertical = true;
	editor.setEditor(buttonPane, tableItem, columnIndex);
	editor.layout();
	text.setData(editorName, editor);
	return text;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:FilterConditionsDialog.java

示例2: addComboInTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private CCombo addComboInTable(TableViewer tableViewer, TableItem tableItem, String comboName, String comboPaneName, 
		String editorName, int columnIndex,	String[] relationalOperators, SelectionListener dropDownSelectionListener,
		ModifyListener modifyListener,FocusListener focusListener) {
	final Composite buttonPane = new Composite(tableViewer.getTable(), SWT.NONE);
	buttonPane.setLayout(new FillLayout());
	final CCombo combo = new CCombo(buttonPane, SWT.NONE);
	combo.setItems(relationalOperators);
	combo.setData(FilterConstants.ROW_INDEX, tableViewer.getTable().indexOf(tableItem));
	tableItem.setData(comboName, combo);
	tableItem.setData(comboPaneName, buttonPane);
	combo.addSelectionListener(dropDownSelectionListener);
	combo.addModifyListener(modifyListener);
	combo.addFocusListener(focusListener);
	new AutoCompleteField(combo, new CComboContentAdapter(), combo.getItems());
	final TableEditor editor = new TableEditor(tableViewer.getTable());
	editor.grabHorizontal = true;
	editor.grabVertical = true;
	editor.setEditor(buttonPane, tableItem, columnIndex);
	editor.layout();
	combo.setData(editorName, editor);
	return combo;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:23,代码来源:FilterConditionsDialog.java

示例3: addButtonInTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void addButtonInTable(TableViewer tableViewer, TableItem tableItem, String columnName, 
		String buttonPaneName, String editorName, int columnIndex, SelectionListener buttonSelectionListener,
		ImagePathConstant imagePath) {
	final Composite buttonPane = new Composite(tableViewer.getTable(), SWT.NONE);
	buttonPane.setLayout(new FillLayout());
	final Button button = new Button(buttonPane, SWT.NONE);
	//button.setText(columnName);
	button.setData(FilterConstants.ROW_INDEX, tableViewer.getTable().indexOf(tableItem));
	tableItem.setData(columnName, button);
	tableItem.setData(buttonPaneName, buttonPane);
	button.addSelectionListener(buttonSelectionListener);
	button.setImage(imagePath.getImageFromRegistry());
	
	final TableEditor editor = new TableEditor(tableViewer.getTable());
	editor.grabHorizontal = true;
	editor.grabVertical = true;
	editor.setEditor(buttonPane, tableItem, columnIndex);
	editor.layout();
	button.setData(editorName, editor);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:21,代码来源:FilterConditionsDialog.java

示例4: addCheckButtonInTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void addCheckButtonInTable(TableViewer tableViewer, TableItem tableItem, String columnName, 
		String groupPaneName, String editorName, int columnIndex, SelectionListener buttonSelectionListener) {
	final Composite buttonPane = new Composite(tableViewer.getTable(), SWT.NONE);
	buttonPane.setLayout(new FillLayout());
	final Button button = new Button(buttonPane, SWT.CHECK);
	button.setData(FilterConstants.ROW_INDEX, tableViewer.getTable().indexOf(tableItem));
	if(null != buttonSelectionListener){
		button.addSelectionListener(buttonSelectionListener);
	}
	tableItem.setData(columnName, button);
	tableItem.setData(groupPaneName, buttonPane);
	
	final TableEditor editor = new TableEditor(tableViewer.getTable());
	editor.grabHorizontal = true;
	editor.grabVertical = true;
	editor.setEditor(buttonPane, tableItem, columnIndex);
	editor.layout();
	button.setData(editorName, editor);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:FilterConditionsDialog.java

示例5: edit

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void edit(final TableItem item, final TableEditor tableEditor) {
    final Text text = new Text(table, SWT.NONE);
    text.setText(item.getText(targetColumn));

    text.addFocusListener(new FocusAdapter() {

        @Override
        public void focusLost(final FocusEvent e) {
            item.setText(targetColumn, text.getText());
            text.dispose();
        }

    });

    tableEditor.setEditor(text, item, targetColumn);
    text.setFocus();
    text.selectAll();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:ModelPropertiesDialog.java

示例6: setTableEditor

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void setTableEditor(final NormalColumn normalColumn, final TableItem tableItem, final Boolean desc) {
    final Button descCheckButton = new Button(indexColumnList, SWT.CHECK);
    descCheckButton.pack();

    if (DBManagerFactory.getDBManager(table.getDiagram()).isSupported(DBManager.SUPPORT_DESC_INDEX)) {

        final TableEditor editor = new TableEditor(indexColumnList);

        editor.minimumWidth = descCheckButton.getSize().x;
        editor.horizontalAlignment = SWT.CENTER;
        editor.setEditor(descCheckButton, tableItem, 1);

        columnCheckMap.put(normalColumn, editor);
    }

    descCheckBoxMap.put(normalColumn, descCheckButton);
    descCheckButton.setSelection(desc.booleanValue());
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:IndexDialog.java

示例7: initNodeTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void initNodeTable() {
    nodeTable.removeAll();

    nodeCheckMap = new HashMap<NodeElement, TableEditor>();

    for (final NodeElement nodeElement : diagram.getDiagramContents().getContents()) {
        final TableItem tableItem = new TableItem(nodeTable, SWT.NONE);

        final Button selectCheckButton = new Button(nodeTable, SWT.CHECK);
        selectCheckButton.pack();

        final TableEditor editor = new TableEditor(nodeTable);

        editor.minimumWidth = selectCheckButton.getSize().x;
        editor.horizontalAlignment = SWT.CENTER;
        editor.setEditor(selectCheckButton, tableItem, 0);

        tableItem.setText(1, ResourceString.getResourceString("label.object.type." + nodeElement.getObjectType()));
        tableItem.setText(2, Format.null2blank(nodeElement.getName()));

        nodeCheckMap.put(nodeElement, editor);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:24,代码来源:CategoryManageDialog.java

示例8: createCheckBoxTableEditor

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
public static TableEditor createCheckBoxTableEditor(TableItem tableItem,
		boolean selection, int column) {
	Table table = tableItem.getParent();

	final Button checkBox = new Button(table, SWT.CHECK);
	checkBox.pack();

	TableEditor editor = new TableEditor(table);

	editor.minimumWidth = checkBox.getSize().x;
	editor.horizontalAlignment = SWT.CENTER;
	editor.setEditor(checkBox, tableItem, column);

	checkBox.setSelection(selection);

	return editor;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:18,代码来源:CompositeFactory.java

示例9: column2TableItem

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void column2TableItem(NormalColumn referencedColumn) {
	TableItem tableItem = new TableItem(this.comparisonTable, SWT.NONE);

	tableItem.setText(0,
			Format.null2blank(referencedColumn.getLogicalName()));

	List<NormalColumn> foreignKeyList = this.referencedMap
			.get(referencedColumn.getRootReferencedColumn());

	TableEditor tableEditor = new TableEditor(this.comparisonTable);
	tableEditor.grabHorizontal = true;

	tableEditor.setEditor(this.createForeignKeyCombo(foreignKeyList),
			tableItem, 1);
	this.tableEditorList.add(tableEditor);
	this.editorReferencedMap.put(tableEditor, foreignKeyList);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:18,代码来源:RelationByExistingColumnsDialog.java

示例10: edit

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void edit(final TableItem item, final TableEditor tableEditor) {
	final Text text = new Text(table, SWT.NONE);
	text.setText(item.getText(targetColumn));

	text.addFocusListener(new FocusAdapter() {

		@Override
		public void focusLost(FocusEvent e) {
			item.setText(targetColumn, text.getText());
			text.dispose();
		}

	});

	tableEditor.setEditor(text, item, targetColumn);
	text.setFocus();
	text.selectAll();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:19,代码来源:ModelPropertiesDialog.java

示例11: setTableEditor

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void setTableEditor(final NormalColumn normalColumn,
		TableItem tableItem, Boolean desc) {
	Button descCheckButton = new Button(this.indexColumnList, SWT.CHECK);
	descCheckButton.pack();

	if (DBManagerFactory.getDBManager(this.table.getDiagram()).isSupported(
			DBManager.SUPPORT_DESC_INDEX)) {

		TableEditor editor = new TableEditor(this.indexColumnList);

		editor.minimumWidth = descCheckButton.getSize().x;
		editor.horizontalAlignment = SWT.CENTER;
		editor.setEditor(descCheckButton, tableItem, 1);

		this.columnCheckMap.put(normalColumn, editor);
	}

	this.descCheckBoxMap.put(normalColumn, descCheckButton);
	descCheckButton.setSelection(desc.booleanValue());
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:21,代码来源:IndexDialog.java

示例12: edit

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void edit(final TableItem item, final TableEditor tableEditor) {
    final Text text = new Text(table, SWT.NONE);
    text.setText(item.getText(targetColumn));

    text.addFocusListener(new FocusAdapter() {

        @Override
        public void focusLost(FocusEvent e) {
            item.setText(targetColumn, text.getText());
            text.dispose();
        }
    });

    tableEditor.setEditor(text, item, targetColumn);
    text.setFocus();
    text.selectAll();
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:18,代码来源:ModelPropertiesDialog.java

示例13: initNodeTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void initNodeTable() {
    nodeTable.removeAll();
    nodeCheckMap = new HashMap<>();
    for (final DiagramWalker walker : getTableWalkers()) {
        final TableItem tableItem = new TableItem(nodeTable, SWT.NONE);
        final Button selectCheckButton = new Button(nodeTable, SWT.CHECK);
        selectCheckButton.pack();
        final TableEditor editor = new TableEditor(nodeTable);
        editor.minimumWidth = selectCheckButton.getSize().x;
        editor.horizontalAlignment = SWT.CENTER;
        editor.setEditor(selectCheckButton, tableItem, 0);
        tableItem.setText(1, DisplayMessages.getMessage("label.object.type." + walker.getObjectType()));
        tableItem.setText(2, walker.getName());
        nodeCheckMap.put(walker, editor);
    }
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:17,代码来源:MainWalkerGroupManageDialog.java

示例14: initNodeTable

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void initNodeTable() {
    nodeTable.removeAll();
    nodeCheckMap = new HashMap<>();
    for (final DiagramWalker nodeElement : diagram.getDiagramContents().getDiagramWalkers()) {
        final TableItem tableItem = new TableItem(nodeTable, SWT.NONE);

        final Button selectCheckButton = new Button(nodeTable, SWT.CHECK);
        selectCheckButton.pack();

        final TableEditor editor = new TableEditor(nodeTable);

        editor.minimumWidth = selectCheckButton.getSize().x;
        editor.horizontalAlignment = SWT.CENTER;
        editor.setEditor(selectCheckButton, tableItem, 0);

        tableItem.setText(1, DisplayMessages.getMessage("label.object.type." + nodeElement.getObjectType()));
        tableItem.setText(2, nodeElement.getName());

        nodeCheckMap.put(nodeElement, editor);
    }
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:22,代码来源:CategoryManageDialog.java

示例15: updateCellControls

import org.eclipse.swt.custom.TableEditor; //导入方法依赖的package包/类
private void updateCellControls() {
	final TableItem[] items = table.getItems();
	for (int i = 0; i < items.length; i++) {
		TableEditor editor = new TableEditor(table);
		final Text text = new Text(table, SWT.NONE);
		text.setText(items[i].getText(2));
		final int index = i;
		text.addModifyListener(new ModifyListener() {

			@Override
			public void modifyText(ModifyEvent e) {
				items[index].setText(2, text.getText());

			}
		});
		editor.grabHorizontal = true;
		editor.setEditor(text, items[i], 2);
	}

}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:21,代码来源:ReasonerSettingsTableFieldEditor.java


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