use of org.netxms.ui.eclipse.dashboard.propertypages.TableColumnSelectionDialog in project netxms by netxms.
the class DCISummaryTableColumnSelector method selectionButtonHandler.
/* (non-Javadoc)
* @see org.netxms.ui.eclipse.widgets.AbstractSelector#selectionButtonHandler()
*/
@Override
protected void selectionButtonHandler() {
String[] valuesArray = null;
if (sourceTable != null) {
valuesArray = sourceTable.getColumnDisplayNames();
}
if (sourceSummaryTable != null) {
List<DciSummaryTableColumn> column = sourceSummaryTable.getColumns();
List<String> tmp = new ArrayList<String>();
for (int i = 0; i < column.size(); i++) {
tmp.add(column.get(i).getName());
}
valuesArray = tmp.toArray(new String[tmp.size()]);
}
TableColumnSelectionDialog dlg = new TableColumnSelectionDialog(getShell(), valuesArray);
if (dlg.open() == Window.OK) {
columnName = dlg.getSelectedName();
setText(columnName == null ? emptySelectionName : columnName);
fireModifyListeners();
}
}
Aggregations