Search in sources :

Example 6 with ICellPainter

use of net.sourceforge.nattable.painter.cell.ICellPainter in project translationstudio8 by heartsome.

the class DefaultSortConfiguration method configureRegistry.

public void configureRegistry(IConfigRegistry configRegistry) {
    configRegistry.registerConfigAttribute(SortConfigAttributes.SORT_COMPARATOR, new DefaultComparator());
    ICellPainter sortableHeaderCellPainter = new BeveledBorderDecorator(new SortableHeaderTextPainter());
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, sortableHeaderCellPainter, DisplayMode.NORMAL, SORT_DOWN_CONFIG_TYPE);
    configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, sortableHeaderCellPainter, DisplayMode.NORMAL, SORT_UP_CONFIG_TYPE);
}
Also used : SortableHeaderTextPainter(net.sourceforge.nattable.sort.painter.SortableHeaderTextPainter) BeveledBorderDecorator(net.sourceforge.nattable.painter.cell.decorator.BeveledBorderDecorator) DefaultComparator(net.sourceforge.nattable.config.DefaultComparator) ICellPainter(net.sourceforge.nattable.painter.cell.ICellPainter)

Aggregations

ICellPainter (net.sourceforge.nattable.painter.cell.ICellPainter)6 LayerCell (net.sourceforge.nattable.layer.cell.LayerCell)4 DefaultComparator (net.sourceforge.nattable.config.DefaultComparator)1 BeveledBorderDecorator (net.sourceforge.nattable.painter.cell.decorator.BeveledBorderDecorator)1 SelectionLayer (net.sourceforge.nattable.selection.SelectionLayer)1 SortableHeaderTextPainter (net.sourceforge.nattable.sort.painter.SortableHeaderTextPainter)1 Rectangle (org.eclipse.swt.graphics.Rectangle)1