use of net.heartsome.cat.ts.ui.xliffeditor.nattable.painter.LineNumberPainter in project translationstudio8 by heartsome.
the class XLIFFEditorImplWithNatTable method addLineNumberToColumn.
/**
* 配置行号列的显示效果
* @param configRegistry
* 配置注册表
*/
private void addLineNumberToColumn(IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, new LineNumberPainter(), DisplayMode.NORMAL, "LINENUMBER_CELL_LABEL");
Style style = new Style();
style.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.CENTER);
style.setAttributeValue(CellStyleAttributes.FONT, GUIHelper.DEFAULT_FONT);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, style, DisplayMode.NORMAL, "LINENUMBER_CELL_LABEL");
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, style, DisplayMode.SELECT, "LINENUMBER_CELL_LABEL");
}
Aggregations