StandaloneNatExampleRunner.run(new PersistentNatExampleWrapper(
new FilterRowGridExample()));
}
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);
}
});