use of org.eclipse.nebula.widgets.nattable.examples.fixtures.FilterRowExampleGridLayer in project nebula.widgets.nattable by eclipse.
the class FilterRowGridExample method createExampleControl.
@Override
public Control createExampleControl(Composite parent) {
IConfigRegistry configRegistry = new ConfigRegistry();
ILayer underlyingLayer = new FilterRowExampleGridLayer(configRegistry);
NatTable natTable = new NatTable(parent, underlyingLayer, false);
natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
natTable.addConfiguration(new HeaderMenuConfiguration(natTable));
// natTable.addConfiguration(new DebugMenuConfiguration(natTable));
natTable.addConfiguration(new FilterRowCustomConfiguration() {
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
super.configureRegistry(configRegistry);
// Shade the row to be slightly darker than the blue background.
final Style rowStyle = new Style();
rowStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.getColor(197, 212, 231));
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, rowStyle, DisplayMode.NORMAL, GridRegion.FILTER_ROW);
}
});
natTable.setConfigRegistry(configRegistry);
natTable.configure();
return natTable;
}
Aggregations