Search in sources :

Example 1 with LineNumberPainter

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");
}
Also used : LineNumberPainter(net.heartsome.cat.ts.ui.xliffeditor.nattable.painter.LineNumberPainter) TagStyle(net.heartsome.cat.common.innertag.TagStyle) Style(net.sourceforge.nattable.style.Style)

Aggregations

TagStyle (net.heartsome.cat.common.innertag.TagStyle)1 LineNumberPainter (net.heartsome.cat.ts.ui.xliffeditor.nattable.painter.LineNumberPainter)1 Style (net.sourceforge.nattable.style.Style)1