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