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


Java EditingSupport类代码示例

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


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

示例1: configureKeyTableViewer

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public void configureKeyTableViewer(final EditingSupport editingSupport) {
	final TableViewer keyTableViewer = (TableViewer)editingSupport.getViewer();
	final TableViewerColumn viewerElementColumn = new TableViewerColumn(keyTableViewer, SWT.LEFT);
	final TableColumn elementColumn = viewerElementColumn.getColumn();
	elementColumn.setText("Y-Axis");

	final TableColumnLayout tableColumnLayout = new TableColumnLayout();
	tableColumnLayout.setColumnData(elementColumn, new ColumnWeightData(1, 175));
	viewerElementColumn.setEditingSupport(editingSupport);
	viewerElementColumn.setLabelProvider(createElementLabelProvider());

	final TableViewerColumn viewerValueColumn = new TableViewerColumn(keyTableViewer, SWT.NONE);
	final TableColumn valueColumn = viewerValueColumn.getColumn();
	valueColumn.setText("Value");
	tableColumnLayout.setColumnData(valueColumn, new ColumnWeightData(2, 140));

	viewerValueColumn.setLabelProvider(createValueLabelProvider());

	keyTableViewer.getTable().getParent().setLayout(tableColumnLayout);
	keyTableViewer.getTable().setLinesVisible(true);
	keyTableViewer.getTable().setHeaderVisible(true);
	keyTableViewer.setUseHashlookup(true);
	keyTableViewer.setInput(yAxisTableItems.add(createYAxisTableItem()));
	keyTableViewer.getTable().getItem(yAxisTableItems.size()-1).setChecked(true);
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:26,代码来源:ChartHelper.java

示例2: initializeColumns

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public static void initializeColumns(final TableViewer tableViewer) {

		EditingSupport[] editing_support = { null, null, null, null, null, new ImportEditingSupport(tableViewer) };

		for (int i = 0; i < TITLES.length; i++) {
			TableViewerColumn col = createTableViewerColumn(tableViewer, i);
			EditingSupport editingSupport = editing_support[i];
			if (editingSupport != null) {
				col.setEditingSupport(editingSupport);
			}
		}
	}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:13,代码来源:OrderSearchTableHelper.java

示例3: initializeColumns

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public static void initializeColumns(final TableViewer tableViewer, final ArticleService articleService,
		final Label posAmountErrorMsg) {

	EditingSupport[] editing_support = { null, null, new ArticleEditingSupport(tableViewer, articleService), null,
			new AmountEditingSupport(tableViewer, posAmountErrorMsg), null };

	for (int i = 0; i < TITLES.length; i++) {
		TableViewerColumn col = createTableViewerColumn(tableViewer, i);
		EditingSupport editingSupport = editing_support[i];
		if (editingSupport != null) {
			col.setEditingSupport(editingSupport);
		}
	}
}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:15,代码来源:PositionsTableHelper.java

示例4: setEditingSupport

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
/** {@inheritDoc} */
public void setEditingSupport(EditingSupport editingSupport)
{
    if (editingSupport instanceof CheckEditingSupport)
    {
        if (checkEditingSupport == null)
        {
            final int colIndex = getColumn().getParent().indexOf(getColumn());
            
            getColumn().getParent().addListener(SWT.Selection, new Listener()
            {                
                public void handleEvent(Event event)
                {                         
                    if (event.detail == SWT.CHECK && event.index == colIndex)
                    {
                        GridItem item = (GridItem)event.item;
                        Object element = item.getData();
                        checkEditingSupport.setValue(element, new Boolean(item.getChecked(colIndex)));
                    }
                }                
            });
        }
        checkEditingSupport = (CheckEditingSupport)editingSupport;
    }
    else
    {
        super.setEditingSupport(editingSupport);
    }        
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:30,代码来源:GridViewerColumn.java

示例5: getEditingSupport

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public EditingSupport getEditingSupport() {
	return _editingSupport;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:4,代码来源:ColumnDefinition.java

示例6: setEditingSupport

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public void setEditingSupport(final EditingSupport editingSupport) {
	_editingSupport = editingSupport;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:4,代码来源:ColumnDefinition.java

示例7: getEditingSupport

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
@Override
public EditingSupport getEditingSupport(ColumnViewer viewer) {
  return new GenericEditingSupport(viewer, this);
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:5,代码来源:GenericTableColumn.java

示例8: getEditingSupport

import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public EditingSupport getEditingSupport(ColumnViewer viewer); 
开发者ID:incentivetoken,项目名称:offspring,代码行数:2,代码来源:IGenericTableColumn.java


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