Search in sources :

Example 1 with TableColumnSelectionDialog

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();
    }
}
Also used : TableColumnSelectionDialog(org.netxms.ui.eclipse.dashboard.propertypages.TableColumnSelectionDialog) ArrayList(java.util.ArrayList) DciSummaryTableColumn(org.netxms.client.datacollection.DciSummaryTableColumn)

Aggregations

ArrayList (java.util.ArrayList)1 DciSummaryTableColumn (org.netxms.client.datacollection.DciSummaryTableColumn)1 TableColumnSelectionDialog (org.netxms.ui.eclipse.dashboard.propertypages.TableColumnSelectionDialog)1