use of org.netxms.ui.eclipse.objecttools.dialogs.EditColumnDialog in project netxms by netxms.
the class Columns method addColumn.
/**
* Add new column
*/
private void addColumn() {
ObjectToolTableColumn tc = new ObjectToolTableColumn(Messages.get().Columns_DefName + Integer.toString(columns.size() + 1));
EditColumnDialog dlg = new EditColumnDialog(getShell(), true, objectTool.getToolType() == ObjectTool.TYPE_TABLE_SNMP, tc);
if (dlg.open() == Window.OK) {
columns.add(tc);
viewer.setInput(columns.toArray());
viewer.setSelection(new StructuredSelection(tc));
}
}
use of org.netxms.ui.eclipse.objecttools.dialogs.EditColumnDialog in project netxms by netxms.
the class Columns method editColumn.
/**
* Edit column
*/
private void editColumn() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.size() != 1)
return;
EditColumnDialog dlg = new EditColumnDialog(getShell(), false, objectTool.getToolType() == ObjectTool.TYPE_TABLE_SNMP, (ObjectToolTableColumn) selection.getFirstElement());
dlg.open();
viewer.update(selection.getFirstElement(), null);
}
Aggregations