Examples of DataColumn


Examples of org.dashbuilder.dataset.DataColumn

        int columnIndex = 0;

        List<DisplayerSettingsColumn> displayerSettingsColumns = displayerSettings.getColumnList();
        for (int i = 0; i < displayerSettingsColumns.size(); i++) {
            DisplayerSettingsColumn displayerSettingsColumn = displayerSettingsColumns.get(i);
            DataColumn dataColumn = null;
            if (displayerSettingsColumn.getColumnId() != null) dataColumn = dataSet.getColumnById(displayerSettingsColumn.getColumnId());
            else dataColumn = dataSet.getColumnByIndex(columnIndex++);
            if (dataColumn == null) {
                throw new RuntimeException("Displayer column not found in the data set: " + displayerSettingsColumn.getDisplayName());
            }

            ColumnType columnType = dataColumn.getColumnType();
            List columnValues = dataColumn.getValues();
            gTable.addColumn(getColumnType(dataColumn), displayerSettingsColumn.getDisplayName(), dataColumn.getId());
            for (int j = 0; j < columnValues.size(); j++) {
                Object value = columnValues.get(j);
                setTableValue(gTable, columnType, value, j, i);
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

        }

        protected DataSetGroupIndex singleGroup(DataSetGroup op, InternalContext context) {

            ColumnGroup columnGroup = op.getColumnGroup();
            DataColumn sourceColumn = context.dataSet.getColumnById(columnGroup.getSourceId());
            ColumnType columnType = sourceColumn.getColumnType();
            GroupStrategy groupStrategy = columnGroup.getStrategy();
            IntervalBuilder intervalBuilder = intervalBuilderLocator.lookup(columnType, groupStrategy);
            if (intervalBuilder == null) throw new RuntimeException("Interval generator not supported.");

            // No index => Build required
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

                result.setValueAt(i, 0, intervalIdx.getName());

                // Add the aggregate calculations.
                for (int j=0; j< groupFunctions.size(); j++) {
                    GroupFunction groupFunction = groupFunctions.get(j);
                    DataColumn dataColumn = dataSet.getColumnById(groupFunction.getSourceId());
                    if (dataColumn == null) dataColumn = dataSet.getColumnByIndex(0);

                    Double aggValue = _calculateFunction(dataColumn, groupFunction.getFunction(), intervalIdx);
                    result.setValueAt(i, j + 1, aggValue);
                }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

            for (int i=0; i< groupFunctions.size(); i++) {
                GroupFunction groupFunction = groupFunctions.get(i);
                result.addColumn(groupFunction.getColumnId(), ColumnType.NUMBER);

                DataColumn dataColumn = dataSet.getColumnById(groupFunction.getSourceId());
                if (dataColumn == null) dataColumn = dataSet.getColumnByIndex(0);

                Double aggValue = _calculateFunction(dataColumn, groupFunction.getFunction(), index);
                result.setValueAt(0, i, aggValue);
            }
View Full Code Here

Examples of org.jdesktop.dataset.DataColumn

    private void initMetaData() {
        List<DataColumn> cols = table.getColumns();
        cachedMetaData = new MetaData[cols.size()];
        cachedFieldNames = new String[cachedMetaData.length];
        for (int i=0; i<cachedMetaData.length; i++) {
            DataColumn col = cols.get(i);
            //TODO if the column name changes, my cache is invalidated!!!
            cachedMetaData[i] = new MetaData(col.getName(), col.getType());
            cachedFieldNames[i] = col.getName();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.