|
Re: Styling based on combination of labels [message #1171418 is a reply to message #1171394] |
Tue, 05 November 2013 08:09 |
Dirk Fauth Messages: 2902 Registered: July 2012 |
Senior Member |
|
|
You could register a different SortableHeaderTextPainter that does not use a TextPainter but your decorator as interior painter.
And you would need to use an ImagePainter with no initial image set, but configure a style that contains an image.
ICellPainter myDecorator = new CellPainterDecorator(new TextPainter(), CellEdgeEnum.LEFT, new ImagePainter());
SortableHeaderTextPainter sortPainter = new SortableHeaderTextPainter(myDecorator);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, sortPainter , DisplayMode.NORMAL, SORT_DOWN_CONFIG_TYPE);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, sortPainter , DisplayMode.NORMAL, SORT_UP_CONFIG_TYPE);
//set the image style for the label
Style imageStyle = new Style();
mageStyle .setAttributeValue(CellStyleAttributes.IMAGE, getImage("key.png"));
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, imageStyle, DisplayMode.NORMAL, LABEL_PK);
|
|
|
|
Powered by
FUDForum. Page generated in 0.01796 seconds