use of org.netxms.ui.eclipse.objecttools.dialogs.EditInputFieldDialog in project netxms by netxms.
the class InputFields method editField.
/**
* Edit column
*/
private void editField() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection.size() != 1)
return;
EditInputFieldDialog dlg = new EditInputFieldDialog(getShell(), false, (InputField) selection.getFirstElement());
if (dlg.open() == Window.OK) {
viewer.update(selection.getFirstElement(), null);
}
}
use of org.netxms.ui.eclipse.objecttools.dialogs.EditInputFieldDialog in project netxms by netxms.
the class InputFields method addField.
/**
* Add new field
*/
private void addField() {
// $NON-NLS-1$
InputField f = new InputField("Field" + Integer.toString(fields.size() + 1));
EditInputFieldDialog dlg = new EditInputFieldDialog(getShell(), true, f);
if (dlg.open() == Window.OK) {
if (nameIsUnique(f.getName())) {
f.setSequence(fields.size());
fields.add(f);
viewer.setInput(fields.toArray());
viewer.setSelection(new StructuredSelection(f));
}
}
}
Aggregations