* The IConfigRegistry that is used by the NatTable instance to
* which the style configuration should be applied to.
*/
protected void configureSelectionAnchorStyle(IConfigRegistry configRegistry) {
// Selection anchor style for normal display mode
IStyle anchorStyle = getSelectionAnchorStyle();
if (!isStyleEmpty(anchorStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, anchorStyle,
DisplayMode.NORMAL,
SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
}
ICellPainter anchorPainter = getSelectionAnchorCellPainter();
if (anchorPainter != null) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER, anchorPainter,
DisplayMode.NORMAL,
SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
}
// Selection anchor style for select display mode
IStyle selectionAnchorStyle = getSelectionAnchorSelectionStyle();
if (!isStyleEmpty(selectionAnchorStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, selectionAnchorStyle,
DisplayMode.SELECT,
SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
}
ICellPainter selectionAnchorPainter = getSelectionAnchorSelectionCellPainter();
if (selectionAnchorPainter != null) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER, selectionAnchorPainter,
DisplayMode.SELECT,
SelectionStyleLabels.SELECTION_ANCHOR_STYLE);
}
// configure selection anchor grid line style
IStyle gridLineStyle = getSelectionAnchorGridLineStyle();
if (!isStyleEmpty(gridLineStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, gridLineStyle,
DisplayMode.SELECT,
SelectionStyleLabels.SELECTION_ANCHOR_GRID_LINE_STYLE);