本文整理汇总了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);
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
示例5: getEditingSupport
import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public EditingSupport getEditingSupport() {
return _editingSupport;
}
示例6: setEditingSupport
import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public void setEditingSupport(final EditingSupport editingSupport) {
_editingSupport = editingSupport;
}
示例7: getEditingSupport
import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
@Override
public EditingSupport getEditingSupport(ColumnViewer viewer) {
return new GenericEditingSupport(viewer, this);
}
示例8: getEditingSupport
import org.eclipse.jface.viewers.EditingSupport; //导入依赖的package包/类
public EditingSupport getEditingSupport(ColumnViewer viewer);