use of org.netxms.ui.eclipse.datacollection.dialogs.EditTableThresholdDialog in project netxms by netxms.
the class TableThresholds method editThreshold.
/**
* Edit selected threshold
*/
private void editThreshold() {
final IStructuredSelection selection = (IStructuredSelection) thresholdList.getSelection();
if (selection.size() == 1) {
final TableThreshold t = (TableThreshold) selection.getFirstElement();
EditTableThresholdDialog dlg = new EditTableThresholdDialog(getShell(), t, editor.getCallback());
if (dlg.open() == Window.OK) {
thresholdList.update(t, null);
}
}
}
use of org.netxms.ui.eclipse.datacollection.dialogs.EditTableThresholdDialog in project netxms by netxms.
the class TableThresholds method addThreshold.
/**
* Add new threshold
*/
private void addThreshold() {
final TableThreshold t = new TableThreshold();
final EditTableThresholdDialog dlg = new EditTableThresholdDialog(getShell(), t, editor.getCallback());
if (dlg.open() == Window.OK) {
thresholds.add(t);
thresholdList.setInput(thresholds.toArray());
thresholdList.setSelection(new StructuredSelection(t));
}
}
Aggregations