use of org.eclipse.nebula.widgets.nattable.group.painter.ColumnGroupHeaderTextPainter in project nebula.widgets.nattable by eclipse.
the class ColumnGroupConfiguration method configureRegistry.
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
Image bgImage = this.tableModel.tableStyle.columnHeaderBgImage;
if (ObjectUtils.isNotNull(bgImage)) {
TextPainter txtPainter = new TextPainter(false, false);
ICellPainter cellPainter = new BackgroundImagePainter(txtPainter, bgImage, GUIHelper.getColor(192, 192, 192));
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, new ColumnGroupHeaderTextPainter(cellPainter), DisplayMode.NORMAL, GridRegion.COLUMN_GROUP_HEADER);
} else {
super.configureRegistry(configRegistry);
}
}
Aggregations