* @param configRegistry
* The IConfigRegistry that is used by the NatTable instance to
* which the style configuration should be applied to.
*/
protected void configureHoverSelectionStyle(IConfigRegistry configRegistry) {
IStyle defaultHoverStyle = getDefaultHoverSelectionStyle();
if (!isStyleEmpty(defaultHoverStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, defaultHoverStyle,
DisplayMode.SELECT_HOVER);
}
ICellPainter defaultHoverCellPainter = getDefaultHoverSelectionCellPainter();
if (defaultHoverCellPainter != null) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER, defaultHoverCellPainter,
DisplayMode.SELECT_HOVER);
}
IStyle bodyHoverStyle = getBodyHoverSelectionStyle();
if (!isStyleEmpty(bodyHoverStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, bodyHoverStyle,
DisplayMode.SELECT_HOVER, GridRegion.BODY);
}
ICellPainter bodyHoverCellPainter = getBodyHoverSelectionCellPainter();
if (bodyHoverCellPainter != null) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER, bodyHoverCellPainter,
DisplayMode.SELECT_HOVER, GridRegion.BODY);
}
IStyle columnHeaderHoverStyle = getColumnHeaderHoverSelectionStyle();
if (!isStyleEmpty(columnHeaderHoverStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, columnHeaderHoverStyle,
DisplayMode.SELECT_HOVER, GridRegion.COLUMN_HEADER);
}
ICellPainter columnHeaderHoverCellPainter = getColumnHeaderHoverSelectionCellPainter();
if (columnHeaderHoverCellPainter != null) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER,
columnHeaderHoverCellPainter, DisplayMode.SELECT_HOVER,
GridRegion.COLUMN_HEADER);
}
IStyle rowHeaderHoverStyle = getRowHeaderHoverSelectionStyle();
if (!isStyleEmpty(rowHeaderHoverStyle)) {
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, rowHeaderHoverStyle,
DisplayMode.SELECT_HOVER, GridRegion.ROW_HEADER);
}