Revision c919ebc6
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixLabelStyleConfiguration.java | ||
---|---|---|
11 | 11 |
import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration; |
12 | 12 |
import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes; |
13 | 13 |
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry; |
14 |
import org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter; |
|
15 |
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter; |
|
16 |
import org.eclipse.nebula.widgets.nattable.painter.cell.decorator.CellPainterDecorator; |
|
14 | 17 |
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes; |
15 | 18 |
import org.eclipse.nebula.widgets.nattable.style.DisplayMode; |
16 | 19 |
import org.eclipse.nebula.widgets.nattable.style.Style; |
20 |
import org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum; |
|
17 | 21 |
import org.eclipse.nebula.widgets.nattable.util.GUIHelper; |
18 | 22 |
|
19 | 23 |
/** |
... | ... | |
24 | 28 |
public final class CharacterMatrixLabelStyleConfiguration extends AbstractRegistryConfiguration { |
25 | 29 |
@Override |
26 | 30 |
public void configureRegistry(IConfigRegistry configRegistry) { |
31 |
//different background color styles |
|
27 | 32 |
Style taxonRowStyle = new Style(); |
28 | 33 |
taxonRowStyle.setAttributeValue( |
29 | 34 |
CellStyleAttributes.BACKGROUND_COLOR, |
... | ... | |
64 | 69 |
DisplayMode.NORMAL, |
65 | 70 |
CharacterMatrix.LABEL_TAXON_LITERATURE_DESCRIPTION); |
66 | 71 |
|
72 |
//cell painter for supplemental data |
|
73 |
configRegistry.registerConfigAttribute( |
|
74 |
CellConfigAttributes.CELL_PAINTER, |
|
75 |
new CellPainterDecorator( |
|
76 |
new TextPainter(), |
|
77 |
CellEdgeEnum.BOTTOM_RIGHT, |
|
78 |
new ImagePainter(GUIHelper.getImage("plus")), |
|
79 |
false), |
|
80 |
DisplayMode.NORMAL, |
|
81 |
CharacterMatrix.LABEL_DESCRIPTION_HAS_SUPPLEMENTAL_DATA); |
|
82 |
|
|
83 |
|
|
67 | 84 |
} |
68 | 85 |
} |
Also available in: Unified diff
ref #7674 Add icon to mark descriptions with sources