Search in sources :

Example 1 with AlternatingRowConfigLabelAccumulator

use of org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator in project nebula.widgets.nattable by eclipse.

the class TickUpdateCommandHandlerTest method registerCellStyleAccumulators.

private void registerCellStyleAccumulators(DataLayer bodyDataLayer) {
    AggregateConfigLabelAccumulator aggregrateConfigLabelAccumulator = new AggregateConfigLabelAccumulator();
    this.columnLabelAccumulator = new ColumnOverrideLabelAccumulator(new DataLayerFixture());
    aggregrateConfigLabelAccumulator.add(this.columnLabelAccumulator, new AlternatingRowConfigLabelAccumulator());
    bodyDataLayer.setConfigLabelAccumulator(aggregrateConfigLabelAccumulator);
}
Also used : DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) ColumnOverrideLabelAccumulator(org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator) AggregateConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.layer.cell.AggregateConfigLabelAccumulator) AlternatingRowConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator)

Example 2 with AlternatingRowConfigLabelAccumulator

use of org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator in project nebula.widgets.nattable by eclipse.

the class GridLayerConfiguration method alternateRowColorConfig.

private void alternateRowColorConfig(GridLayer gridLayer) {
    DefaultRowStyleConfiguration rowStyleConfig = new DefaultRowStyleConfiguration();
    rowStyleConfig.evenRowBgColor = properties.evenRowColor;
    rowStyleConfig.oddRowBgColor = properties.oddRowColor;
    addConfiguration(rowStyleConfig);
    gridLayer.setConfigLabelAccumulatorForRegion(GridRegion.BODY, new AlternatingRowConfigLabelAccumulator());
}
Also used : DefaultRowStyleConfiguration(org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultRowStyleConfiguration) AlternatingRowConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator)

Example 3 with AlternatingRowConfigLabelAccumulator

use of org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator in project nebula.widgets.nattable by eclipse.

the class ColumnReorderLayerTest method registerCellStyleAccumulators.

private void registerCellStyleAccumulators(DataLayer bodyDataLayer, ColumnOverrideLabelAccumulator columnLabelAccumulator) {
    AggregateConfigLabelAccumulator aggregrateConfigLabelAccumulator = new AggregateConfigLabelAccumulator();
    aggregrateConfigLabelAccumulator.add(columnLabelAccumulator, new AlternatingRowConfigLabelAccumulator());
    bodyDataLayer.setConfigLabelAccumulator(aggregrateConfigLabelAccumulator);
}
Also used : AggregateConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.layer.cell.AggregateConfigLabelAccumulator) AlternatingRowConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator)

Example 4 with AlternatingRowConfigLabelAccumulator

use of org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator in project nebula.widgets.nattable by eclipse.

the class DefaultGridLayerConfiguration method addAlternateRowColoringConfig.

protected void addAlternateRowColoringConfig(CompositeLayer gridLayer) {
    addConfiguration(new DefaultRowStyleConfiguration());
    gridLayer.setConfigLabelAccumulatorForRegion(GridRegion.BODY, new AlternatingRowConfigLabelAccumulator(gridLayer.getChildLayerByRegionName(GridRegion.BODY)));
}
Also used : AlternatingRowConfigLabelAccumulator(org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator)

Aggregations

AlternatingRowConfigLabelAccumulator (org.eclipse.nebula.widgets.nattable.grid.cell.AlternatingRowConfigLabelAccumulator)4 AggregateConfigLabelAccumulator (org.eclipse.nebula.widgets.nattable.layer.cell.AggregateConfigLabelAccumulator)2 DefaultRowStyleConfiguration (org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultRowStyleConfiguration)1 ColumnOverrideLabelAccumulator (org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator)1 DataLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture)1