本文整理匯總了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);