use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.
the class DefaultColumnHeaderStyleConfiguration method configureRegistry.
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
// configure the painter
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.cellPainter, DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.cellPainter, DisplayMode.NORMAL, GridRegion.CORNER);
// configure whether to render grid lines or not
// e.g. for the BeveledBorderDecorator the rendering of the grid lines
// should be disabled
configRegistry.registerConfigAttribute(CellConfigAttributes.RENDER_GRID_LINES, this.renderGridLines, DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
configRegistry.registerConfigAttribute(CellConfigAttributes.RENDER_GRID_LINES, this.renderGridLines, DisplayMode.NORMAL, GridRegion.CORNER);
// configure the normal style
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bgColor);
cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.fgColor);
cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.gradientBgColor);
cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.gradientFgColor);
cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.hAlign);
cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.vAlign);
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.borderStyle);
cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.font);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.NORMAL, GridRegion.CORNER);
}
use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.
the class DefaultRowHeaderStyleConfiguration method configureRowHeaderStyle.
protected void configureRowHeaderStyle(IConfigRegistry configRegistry) {
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bgColor);
cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.fgColor);
cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_BACKGROUND_COLOR, this.gradientBgColor);
cellStyle.setAttributeValue(CellStyleAttributes.GRADIENT_FOREGROUND_COLOR, this.gradientFgColor);
cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, this.hAlign);
cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, this.vAlign);
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.borderStyle);
cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.font);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.NORMAL, GridRegion.ROW_HEADER);
}
use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionStyleConfiguration method configureSelectionAnchorStyle.
protected void configureSelectionAnchorStyle(IConfigRegistry configRegistry) {
// Selection anchor style for normal display mode
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.anchorBorderStyle);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.NORMAL, SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
// Selection anchor style for select display mode
cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.anchorBgColor);
cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.anchorFgColor);
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.anchorBorderStyle);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
}
use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionStyleConfiguration method configureHeaderHasSelectionStyle.
protected void configureHeaderHasSelectionStyle(IConfigRegistry configRegistry) {
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.selectedHeaderFgColor);
cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.selectedHeaderBgColor);
cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.selectedHeaderFont);
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.selectedHeaderBorderStyle);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, GridRegion.COLUMN_HEADER);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle.clone(), DisplayMode.SELECT, GridRegion.CORNER);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle.clone(), DisplayMode.SELECT, GridRegion.ROW_HEADER);
}
use of org.eclipse.nebula.widgets.nattable.style.Style in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionStyleConfiguration method configureSelectionAnchorGridLineStyle.
protected void configureSelectionAnchorGridLineStyle(IConfigRegistry configRegistry) {
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.anchorGridBorderStyle);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.SELECT, SelectionStyleLabels.SELECTION_ANCHOR_GRID_LINE_STYLE);
}
Aggregations