private ColumnModel<Point> buildColumnModel(DimensionSet dimensionSet) { List<ColumnConfig<Point, ?>> columns = new ArrayList<>(); for (int i = 0; i < dimensionSet.getCount(); i++) { ColumnConfig<Point, String> column = new ColumnConfig<>(new PointDimProvider(i)); column.setHeader(dimensionSet.getDimension(i).getLabel()); column.setSortable(false); column.setHideable(false); columns.add(column); } ColumnConfig<Point, Double> valueColumn = new ColumnConfig<>(new PointValueProvider()); valueColumn.setHeader(I18N.CONSTANTS.value()); valueColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LOCALE_END); valueColumn.setSortable(false); valueColumn.setHideable(false); columns.add(valueColumn); return new ColumnModel<>(columns); }
private void addErrorColumn(EffectiveTableColumn tableColumn, ErrorFormat errorFormat) { ValueProvider<Integer, String> valueProvider = new ValueProvider<Integer, String>() { @Override public String getValue(Integer object) { return null; } @Override public void setValue(Integer object, String value) { } @Override public String getPath() { return tableColumn.getId(); } }; ColumnConfig<Integer, String> config = new ColumnConfig<>(valueProvider, tableColumn.getWidth()); config.setHeader(tableColumn.getLabel()); config.setCell(new ErrorCell()); config.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LOCALE_END); config.setSortable(false); columnConfigs.add(config); }
private void addMultiEnumColumn(EffectiveTableColumn tableColumn, MultiEnumFormat multiEnumFormat) { // Add a single, comma-delimited list for now ValueProvider<Integer, String> valueProvider = proxy.getValueProvider(tableColumn.getId(), multiEnumFormat.createRenderer()); ColumnConfig<Integer, String> config = new ColumnConfig<>(valueProvider, tableColumn.getWidth()); config.setHeader(tableColumn.getLabel()); config.setSortable(false); columnConfigs.add(config); addEnumFilter(valueProvider.getPath(), tableColumn, (EnumType) tableColumn.getType()); }
EffectiveDimension rowDim = rowDimensions.get(i); ColumnConfig<PivotRow, String> column = new ColumnConfig<>(new PivotRowHeaderProvider(i)); column.setSortable(false); column.setHideable(false); column.setHeader(rowDim.getLabel()); column.setHeader(leafColumn.getCategoryLabel()); column.setSortable(false); column.setHideable(false); column.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LOCALE_END);