use of org.netxms.ui.eclipse.alarmviewer.dialogs.AlarmCategorySelectionDialog in project netxms by netxms.
the class AlarmCategorySelector method selectionButtonHandler.
/*
* (non-Javadoc)
*
* @see org.netxms.ui.eclipse.widgets.AbstractSelector#selectionButtonHandler()
*/
@Override
protected void selectionButtonHandler() {
AlarmCategorySelectionDialog dlg = new AlarmCategorySelectionDialog(getShell());
if (dlg.open() == Window.OK) {
categoryId.clear();
AlarmCategory[] categories = dlg.getSelectedCategories();
if ((categories != null) && (categories.length > 0)) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < categories.length; i++) {
categoryId.add(categories[i].getId());
sb.append(categories[i].getName() + "; ");
}
setText(sb.toString());
} else {
setText("<none>");
}
}
}
Aggregations