Search in sources :

Example 1 with DefaultDisplayConverter

use of net.sourceforge.nattable.data.convert.DefaultDisplayConverter in project translationstudio8 by heartsome.

the class DefaultNatTableStyleConfiguration method configureRegistry.

public void configureRegistry(IConfigRegistry configRegistry) {
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, cellPainter);
    Style cellStyle = new Style();
    cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, bgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, fgColor);
    cellStyle.setAttributeValue(CellStyleAttributes.FONT, font);
    cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, hAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, vAlign);
    cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, borderStyle);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle);
    configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER, new DefaultDisplayConverter());
}
Also used : Style(net.sourceforge.nattable.style.Style) BorderStyle(net.sourceforge.nattable.style.BorderStyle) DefaultDisplayConverter(net.sourceforge.nattable.data.convert.DefaultDisplayConverter)

Aggregations

DefaultDisplayConverter (net.sourceforge.nattable.data.convert.DefaultDisplayConverter)1 BorderStyle (net.sourceforge.nattable.style.BorderStyle)1 Style (net.sourceforge.nattable.style.Style)1