public void pushDataToView() {

        getView().dataClear();
        getView().dataRowCount(dataSet.getRowCount());

        List<DataColumn> columns = dataSet.getColumns();
        for (int i = 0; i < columns.size(); i++) {
            DataColumn dataColumn = columns.get(i);
            String columnId = dataColumn.getId();
            ColumnType columnType = dataColumn.getColumnType();
            ColumnSettings columnSettings = displayerSettings.getColumnSettings(dataColumn);

            getView().dataAddColumn(dataColumn.getColumnType(), columnId, columnSettings.getColumnName());

            List columnValues = dataColumn.getValues();
            for (int j = 0; j < columnValues.size(); j++) {
                Object value = columnValues.get(j);

                if (ColumnType.DATE.equals(columnType)) {
                    getView().dataSetValue(j, i, value == null ? new Date() : (Date) value);
                }
                else if (ColumnType.NUMBER.equals(columnType)) {
                    if (value == null) {
                        getView().dataSetValue(j, i, 0d);
                    } else {
                        String valueStr = getEvaluator().evalExpression(value.toString(), columnSettings.getValueExpression());
                        getView().dataSetValue(j, i, Double.parseDouble(valueStr));
                    }
                }
                else {
                    String valueStr = super.formatValue(j, i);
                    getView().dataSetValue(j, i, valueStr);
                }
            }
        }

        // Format the table values
        for (int i = 0; i < dataSet.getColumns().size(); i++) {
            DataColumn dataColumn = columns.get(i);
            ColumnSettings columnSettings = displayerSettings.getColumnSettings(dataColumn);
            String pattern = columnSettings.getValuePattern();

            if (ColumnType.DATE.equals(dataColumn.getColumnType())) {
                getView().dataFormatDateColumn(pattern, i);
            }
            else if (ColumnType.NUMBER.equals(dataColumn.getColumnType())) {
                getView().dataFormatNumberColumn(pattern, i);
            }
        }
    }
public void pushDataToView ( ) { getView ( ) . dataClear ( ) ; getView ( ) . dataRowCount ( dataSet . getRowCount ( ) ) ; List < DataColumn > columns = dataSet . getColumns ( ) ; for ( int i = 0 ; i < columns . size ( ) ; i ++ ) { DataColumn dataColumn = columns . get ( i ) ; String columnId = dataColumn . getId ( ) ; ColumnType columnType = dataColumn . getColumnType ( ) ; ColumnSettings columnSettings = displayerSettings . getColumnSettings ( dataColumn ) ; getView ( ) . dataAddColumn ( dataColumn . getColumnType ( ) , columnId , columnSettings . getColumnName ( ) ) ; List columnValues = dataColumn . getValues ( ) ; for ( int j = 0 ; j < columnValues . size ( ) ; j ++ ) { Object value = columnValues . get ( j ) ; if ( ColumnType . DATE . equals ( columnType ) ) { getView ( ) . dataSetValue ( j , i , value == null ? new Date ( ) : ( Date ) value ) ; } else if ( ColumnType . NUMBER . equals ( columnType ) ) { if ( value == null ) { getView ( ) . dataSetValue ( j , i , 0d ) ; } else { String valueStr = getEvaluator ( ) . evalExpression ( value . toString ( ) , columnSettings . getValueExpression ( ) ) ; getView ( ) . dataSetValue ( j , i , Double . parseDouble ( valueStr ) ) ; } } else { String valueStr = super . formatValue ( j , i ) ; getView ( ) . dataSetValue ( j , i , valueStr ) ; } } } for ( int i = 0 ; i < dataSet . getColumns ( ) . size ( ) ; i ++ ) { DataColumn dataColumn = columns . get ( i ) ; ColumnSettings columnSettings = displayerSettings . getColumnSettings ( dataColumn ) ; String pattern = columnSettings . getValuePattern ( ) ; if ( ColumnType . DATE . equals ( dataColumn . getColumnType ( ) ) ) { getView ( ) . dataFormatDateColumn ( pattern , i ) ; } else if ( ColumnType . NUMBER . equals ( dataColumn . getColumnType ( ) ) ) { getView ( ) . dataFormatNumberColumn ( pattern , i ) ; } } }
Data generation