Class ThemeConfiguration
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration
-
- org.eclipse.nebula.widgets.nattable.style.theme.ThemeConfiguration
-
- All Implemented Interfaces:
IConfiguration
- Direct Known Subclasses:
DefaultNatTableThemeConfiguration
public abstract class ThemeConfiguration extends AbstractRegistryConfiguration
SpecialisedIConfiguration
that combines style configurations for different parts of a NatTable composition. It can be used in two different ways:- As it is a
IConfiguration
it can be simply added to a NatTable instance like any other configuration.NatTable natTable = new NatTable(parent, layer, false); natTable.addConfiguration(new MyThemeConfiguration()); natTable.configure();
Using it like this will apply the style configurations, but might cause issues when trying to switch to another theme configuration, because the configurations can not be cleaned up correctly. - Setting the ThemeConfiguration via
NatTable.setTheme(ThemeConfiguration)
. This will internally use aThemeManager
which supports switching themes at runtime.
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList<IThemeExtension>
extensions
Collection ofIThemeExtension
that should be added to this ThemeConfiguration.protected boolean
styleCornerLikeColumnHeader
Flag to configure whether the corner should be styled like the column header in a grid composition.
-
Constructor Summary
Constructors Constructor Description ThemeConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addThemeExtension(IThemeExtension extension)
Adds an IThemeExtension to this ThemeConfiguration which adds additional styling configuration on top.protected void
configureAlternatingRowStyle(IConfigRegistry configRegistry)
When creating a NatTable grid composition, using theDefaultGridLayerConfiguration
, theAlternatingRowConfigLabelAccumulator
is configured for the body region to apply labels for alternating rows.protected void
configureColumnGroupHeaderStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the column group header in a NatTable.protected void
configureColumnHeaderSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in a column header in a NatTable.protected void
configureColumnHeaderStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the column header in a NatTable.protected void
configureCopyBorderStyle(IConfigRegistry configRegistry)
Register the style configurations to render the copy border.protected void
configureCornerSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in the corner of a NatTable.protected void
configureCornerStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the corner in a NatTable.protected void
configureDataChangeStyle(IConfigRegistry configRegistry)
Register the style configurations to render cells in dirty state.protected void
configureDefaultSelectionStyle(IConfigRegistry configRegistry)
Register default selection style configurations.protected void
configureDefaultStyle(IConfigRegistry configRegistry)
Register default style configurations.protected void
configureEditErrorStyle(IConfigRegistry configRegistry)
This method is used to register the styles that should be applied to an editor control in case of conversion/validation errors.protected void
configureFillHandleStyle(IConfigRegistry configRegistry)
Register the style configurations to render the fill handle.protected void
configureFilterRowStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the filter row.protected void
configureFreezeStyle(IConfigRegistry configRegistry)
This method is used to register the style attributes for freeze rendering.protected void
configureGridLineStyle(IConfigRegistry configRegistry)
This method is used to register the grid line styling, which consists of grid line color and the configuration if grid lines should be rendered or not.protected void
configureHideIndicatorStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the hide indicator.protected void
configureHoverSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for hovering selections.protected void
configureHoverStyle(IConfigRegistry configRegistry)
Register the style configurations for hovering.void
configureRegistry(IConfigRegistry configRegistry)
Configure NatTable'sIConfigRegistry
upon receiving this callback.protected void
configureRowGroupHeaderStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the row group header in a NatTable.protected void
configureRowHeaderSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in a row header in a NatTable.protected void
configureRowHeaderStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the row header in a NatTable.protected void
configureSelectedSortHeaderStyle(IConfigRegistry configRegistry)
This method is used to register styles for the selected sort header layer.protected void
configureSelectionAnchorStyle(IConfigRegistry configRegistry)
Register the style configurations to render the selection anchor.protected void
configureSortHeaderStyle(IConfigRegistry configRegistry)
This method is used to register styles for the sort header layer.protected void
configureSummaryRowStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for a summary row.protected void
configureTreeStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for a tree representation.void
createPainterInstances()
This method should be used to create theICellPainter
instances.protected abstract ICellPainter
getBodyHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable body region.protected abstract ICellPainter
getBodyHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable body region.protected abstract IStyle
getBodyHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable body region.protected abstract IStyle
getBodyHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable body region.protected abstract ICellPainter
getColumnGroupHeaderCellPainter()
Returns theICellPainter
that should be used to render the column group header in a NatTable.protected abstract IStyle
getColumnGroupHeaderStyle()
Returns theIStyle
that should be used to render the column group header in a NatTable.protected abstract ICellPainter
getColumnHeaderCellPainter()
Returns theICellPainter
that should be used to render the column header in a NatTable.protected abstract ICellPainter
getColumnHeaderFullSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the column header of a NatTable when all cells in the column are selected.protected abstract IStyle
getColumnHeaderFullSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the column header of a NatTable when all cells in the column are selected.protected abstract ICellPainter
getColumnHeaderHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable column header region.protected abstract ICellPainter
getColumnHeaderHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable column header region.protected abstract IStyle
getColumnHeaderHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable column header region.protected abstract IStyle
getColumnHeaderHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable column header region.protected abstract ICellPainter
getColumnHeaderSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the column header of a NatTable.protected abstract IStyle
getColumnHeaderSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the column header of a NatTable.protected abstract IStyle
getColumnHeaderStyle()
Returns theIStyle
that should be used to render the column header in a NatTable.protected abstract IStyle
getConversionErrorStyle()
Returns theIStyle
that should be applied to an editor in case the input is invalid in terms of conversion errors.protected abstract IStyle
getCopyBorderStyle()
Returns theIStyle
that should be used to render the copy border.protected abstract ICellPainter
getCornerCellPainter()
Returns theICellPainter
that should be used to render the corner in a NatTable.protected abstract ICellPainter
getCornerSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the corner of a NatTable.protected abstract IStyle
getCornerSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the corner of a NatTable.protected abstract IStyle
getCornerStyle()
Returns theIStyle
that should be used to render the corner of a NatTable.protected abstract IStyle
getDataChangeSelectionStyle()
Returns theIStyle
that should be used to render dirty cells inDisplayMode.SELECT
.protected abstract IStyle
getDataChangeStyle()
Returns theIStyle
that should be used to render dirty cells inDisplayMode.NORMAL
.protected abstract ICellPainter
getDefaultCellPainter()
Returns the defaultICellPainter
that is used to render the NatTable.protected abstract IStyle
getDefaultCellStyle()
protected abstract ICellPainter
getDefaultHoverCellPainter()
Returns theICellPainter
that should be used by default to render hovered cells in a NatTable.protected abstract ICellPainter
getDefaultHoverSelectionCellPainter()
Returns theICellPainter
that should be used by default to render hovered selected cells in a NatTable.protected abstract IStyle
getDefaultHoverSelectionStyle()
Returns theIStyle
that should be used by default to render hovered selected cells in a NatTable.protected abstract IStyle
getDefaultHoverStyle()
Returns theIStyle
that should be used by default to render hovered cells in a NatTable.protected abstract ICellPainter
getDefaultSelectionCellPainter()
Returns the defaultICellPainter
that is used to render selected cells in NatTable.protected abstract IStyle
getDefaultSelectionCellStyle()
protected abstract ICellPainter
getEvenRowCellPainter()
Returns theICellPainter
that should be used to render alternating rows.protected abstract IStyle
getEvenRowStyle()
Returns theIStyle
that should be used to render alternating rows.protected abstract BorderStyle
getFillHandleBorderStyle()
Returns theBorderStyle
that should be used to render the border of the fill handle.protected abstract org.eclipse.swt.graphics.Color
getFillHandleColor()
Returns theColor
that should be used to render the fill handle.protected abstract BorderStyle
getFillHandleRegionBorderStyle()
Returns theBorderStyle
that should be used to render the border around the fill handle region.protected abstract ICellPainter
getFilterRowCellPainter()
Returns theICellPainter
that should be used to render the filter row cells in a NatTable.protected abstract IStyle
getFilterRowStyle()
Returns theIStyle
that should be used to render the filter row in a NatTable.protected abstract org.eclipse.swt.graphics.Color
getFreezeSeparatorColor()
Returns theColor
that should be used to render the freeze separator.protected abstract Integer
getFreezeSeparatorWidth()
Returns the width that should be used by the freeze separator.protected abstract org.eclipse.swt.graphics.Color
getGridLineColor()
Returns theColor
that should be used to render the grid lines.protected abstract org.eclipse.swt.graphics.Color
getHideIndicatorColor()
Returns theColor
that should be used to render the hide indicator .protected abstract Integer
getHideIndicatorWidth()
Returns the width that should be used by the hide indicator.protected abstract ICellPainter
getOddRowCellPainter()
Returns theICellPainter
that should be used to render alternating rows.protected abstract IStyle
getOddRowStyle()
Returns theIStyle
that should be used to render alternating rows.protected abstract Boolean
getRenderBodyGridLines()
Returns whether grid lines in the body should be rendered or not.protected abstract Boolean
getRenderColumnHeaderGridLines()
Returns whether grid lines in the column header should be rendered or not.protected abstract Boolean
getRenderCornerGridLines()
Returns whether grid lines in the corner region should be rendered or not.protected abstract Boolean
getRenderFilterRowGridLines()
Returns whether grid lines in the filter row should be rendered or not.protected abstract Boolean
getRenderRowHeaderGridLines()
Returns whether grid lines in the row header should be rendered or not.protected abstract ICellPainter
getRowGroupHeaderCellPainter()
Returns theICellPainter
that should be used to render the row group header in a NatTable.protected abstract IStyle
getRowGroupHeaderStyle()
Returns theIStyle
that should be used to render the row group header in a NatTable.protected abstract ICellPainter
getRowHeaderCellPainter()
Returns theICellPainter
that should be used to render the row header in a NatTable.protected abstract ICellPainter
getRowHeaderFullSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the row header of a NatTable when all cells in the row are selected.protected abstract IStyle
getRowHeaderFullSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the row header of a NatTable when all cells in the row are selected.protected abstract ICellPainter
getRowHeaderHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable row header region.protected abstract ICellPainter
getRowHeaderHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable row header region.protected abstract IStyle
getRowHeaderHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable row header region.protected abstract IStyle
getRowHeaderHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable row header region.protected abstract ICellPainter
getRowHeaderSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the row header of a NatTable.protected abstract IStyle
getRowHeaderSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the row header of a NatTable.protected abstract IStyle
getRowHeaderStyle()
Returns theIStyle
that should be used to render the row header in a NatTable.protected abstract ICellPainter
getSelectedSortHeaderCellPainter()
Returns theICellPainter
that should be used to render the sort header cells in a NatTable in selected state.protected abstract IStyle
getSelectedSortHeaderStyle()
Returns theIStyle
that should be used to render the sort header in a NatTable in selected state.protected abstract ICellPainter
getSelectionAnchorCellPainter()
Returns theICellPainter
that is used to render the selection anchor in normal display mode.protected abstract IStyle
getSelectionAnchorGridLineStyle()
Returns theIStyle
that should be used to render the grid lines around the selection anchor.protected abstract ICellPainter
getSelectionAnchorSelectionCellPainter()
Returns theICellPainter
that is used to render the selection anchor in selection display mode.protected abstract IStyle
getSelectionAnchorSelectionStyle()
Returns theIStyle
that is used to render the selection anchor in selection display mode.protected abstract IStyle
getSelectionAnchorStyle()
Returns theIStyle
that is used to render the selection anchor in normal display mode.protected abstract ICellPainter
getSortHeaderCellPainter()
Returns theICellPainter
that should be used to render the sort header cells in a NatTable.protected abstract IStyle
getSortHeaderStyle()
Returns theIStyle
that should be used to render the sort header in a NatTable.protected abstract ICellPainter
getSummaryRowCellPainter()
Returns theICellPainter
that should be used to render the summary row cells in a NatTable.protected abstract ICellPainter
getSummaryRowSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected summary row cells in a NatTable.protected abstract IStyle
getSummaryRowSelectionStyle()
Returns theIStyle
that should be used to render the selected summary row cells in a NatTable.protected abstract IStyle
getSummaryRowStyle()
Returns theIStyle
that should be used to render the summary row cells in a NatTable.protected abstract ICellPainter
getTreeCellPainter()
Returns theICellPainter
that should be used to render the tree column cells in a NatTable.protected abstract ICellPainter
getTreeSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected tree column cells in a NatTable.protected abstract IStyle
getTreeSelectionStyle()
Returns theIStyle
that should be used to render the selected tree column cells in a NatTable.protected abstract ICellPainter
getTreeStructurePainter()
Returns theICellPainter
that should be used to render the tree structure in a NatTable.protected abstract ICellPainter
getTreeStructureSelectionPainter()
Returns theICellPainter
that should be used to render the selected tree structure in a NatTable.protected abstract IStyle
getTreeStyle()
Returns theIStyle
that should be used to render the tree column cells in a NatTable.protected abstract IStyle
getValidationErrorStyle()
Returns theIStyle
that should be applied to an editor in case the input is invalid in terms of validation errors.static boolean
isStyleEmpty(IStyle style)
Null-safe check if aIStyle
is empty or not.void
removeThemeExtension(IThemeExtension extension)
Removes an IThemeExtension that was added to this ThemeConfiguration before.void
unregisterThemeStyleConfigurations(IConfigRegistry configRegistry)
Unregister the style configurations that were applied by this ThemeConfiguration.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration
configureLayer, configureUiBindings
-
-
-
-
Field Detail
-
styleCornerLikeColumnHeader
protected boolean styleCornerLikeColumnHeader
Flag to configure whether the corner should be styled like the column header in a grid composition. The ThemeConfiguration supports different styling of different regions, so the default value isfalse
. But typically the corner is styled like the column header to provide a concise styling.
-
extensions
protected final ArrayList<IThemeExtension> extensions
Collection ofIThemeExtension
that should be added to this ThemeConfiguration.
-
-
Method Detail
-
configureRegistry
public void configureRegistry(IConfigRegistry configRegistry)
Description copied from interface:IConfiguration
Configure NatTable'sIConfigRegistry
upon receiving this callback. A mechanism to plug-in customICellPainter
,IDataValidator
etc.- Parameters:
configRegistry
- TheIConfigRegistry
instance to register configuration values to.
-
createPainterInstances
public void createPainterInstances()
This method should be used to create theICellPainter
instances. This is needed for zoom operations so the painter are re-created with settings that match the current scaling (e.g. images).- Since:
- 2.0
-
configureDefaultStyle
protected void configureDefaultStyle(IConfigRegistry configRegistry)
Register default style configurations. Typically these configurations are used be the body region and will be overridden by more specific configurations of the header regions or custom styling based on labels.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getDefaultCellStyle
protected abstract IStyle getDefaultCellStyle()
- Returns:
- The
IStyle
that should be used by default to render NatTable.
-
getDefaultCellPainter
protected abstract ICellPainter getDefaultCellPainter()
Returns the defaultICellPainter
that is used to render the NatTable.Typically this
ICellPainter
is used to render the body region and is overridden for other regions or other custom styling configurations based on labels.- Returns:
- The
ICellPainter
that should be used by default to render NatTable.
-
configureColumnHeaderStyle
protected void configureColumnHeaderStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the column header in a NatTable.By default this means to register the style configurations against
DisplayMode.NORMAL
and config/region labelGridRegion.COLUMN_HEADER
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getColumnHeaderStyle
protected abstract IStyle getColumnHeaderStyle()
Returns theIStyle
that should be used to render the column header in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.COLUMN_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the column header in a NatTable.
-
getColumnHeaderCellPainter
protected abstract ICellPainter getColumnHeaderCellPainter()
Returns theICellPainter
that should be used to render the column header in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.COLUMN_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the column header in a NatTable.
-
configureRowHeaderStyle
protected void configureRowHeaderStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the row header in a NatTable.By default this means to register the style configurations against
DisplayMode.NORMAL
and config/region labelGridRegion.ROW_HEADER
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getRowHeaderStyle
protected abstract IStyle getRowHeaderStyle()
Returns theIStyle
that should be used to render the row header in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.ROW_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the row header in a NatTable.
-
getRowHeaderCellPainter
protected abstract ICellPainter getRowHeaderCellPainter()
Returns theICellPainter
that should be used to render the row header in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.ROW_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the row header in a NatTable.
-
configureCornerStyle
protected void configureCornerStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the corner in a NatTable.By default this means to register the style configurations against
DisplayMode.NORMAL
and config/region labelGridRegion.CORNER
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getCornerStyle
protected abstract IStyle getCornerStyle()
Returns theIStyle
that should be used to render the corner of a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.CORNER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the corner of a NatTable.
-
getCornerCellPainter
protected abstract ICellPainter getCornerCellPainter()
Returns theICellPainter
that should be used to render the corner in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.CORNER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the corner in a NatTable.
-
configureHoverStyle
protected void configureHoverStyle(IConfigRegistry configRegistry)
Register the style configurations for hovering.This means to register the style configurations against
DisplayMode.HOVER
. Additionally the GridRegion labels are used to register hover styles per region.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getDefaultHoverStyle
protected abstract IStyle getDefaultHoverStyle()
Returns theIStyle
that should be used by default to render hovered cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.HOVER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered cells in a NatTable.
-
getDefaultHoverCellPainter
protected abstract ICellPainter getDefaultHoverCellPainter()
Returns theICellPainter
that should be used by default to render hovered cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.HOVER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered cells in a NatTable.
-
getBodyHoverStyle
protected abstract IStyle getBodyHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable body region.That means this
IStyle
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.BODY
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered cells in a NatTable body region.
-
getBodyHoverCellPainter
protected abstract ICellPainter getBodyHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable body region.That means this
ICellPainter
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.BODY
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered cells in a NatTable body region.
-
getColumnHeaderHoverStyle
protected abstract IStyle getColumnHeaderHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable column header region.That means this
IStyle
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.COLUMN_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered cells in a NatTable column header region.
-
getColumnHeaderHoverCellPainter
protected abstract ICellPainter getColumnHeaderHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable column header region.That means this
ICellPainter
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.COLUMN_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered cells in a NatTable column header region.
-
getRowHeaderHoverStyle
protected abstract IStyle getRowHeaderHoverStyle()
Returns theIStyle
that should be used to render hovered cells in a NatTable row header region.That means this
IStyle
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.ROW_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered cells in a NatTable row header region.
-
getRowHeaderHoverCellPainter
protected abstract ICellPainter getRowHeaderHoverCellPainter()
Returns theICellPainter
that should be used to render hovered cells in a NatTable row header region.That means this
ICellPainter
is registered againstDisplayMode.HOVER
in the region with the region labelGridRegion.ROW_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered cells in a NatTable row header region.
-
configureHoverSelectionStyle
protected void configureHoverSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for hovering selections.This means to register the style configurations against
DisplayMode.SELECT_HOVER
. Additionally the GridRegion labels are used to register hover styles per region.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getDefaultHoverSelectionStyle
protected abstract IStyle getDefaultHoverSelectionStyle()
Returns theIStyle
that should be used by default to render hovered selected cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT_HOVER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered selected cells in a NatTable.
-
getDefaultHoverSelectionCellPainter
protected abstract ICellPainter getDefaultHoverSelectionCellPainter()
Returns theICellPainter
that should be used by default to render hovered selected cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT_HOVER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered selected cells in a NatTable.
-
getBodyHoverSelectionStyle
protected abstract IStyle getBodyHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable body region.That means this
IStyle
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.BODY
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered selected cells in a NatTable body region.
-
getBodyHoverSelectionCellPainter
protected abstract ICellPainter getBodyHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable body region.That means this
ICellPainter
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.BODY
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered selected cells in a NatTable body region.
-
getColumnHeaderHoverSelectionStyle
protected abstract IStyle getColumnHeaderHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable column header region.That means this
IStyle
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.COLUMN_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered selected cells in a NatTable column header region.
-
getColumnHeaderHoverSelectionCellPainter
protected abstract ICellPainter getColumnHeaderHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable column header region.That means this
ICellPainter
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.COLUMN_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered selected cells in a NatTable column header region.
-
getRowHeaderHoverSelectionStyle
protected abstract IStyle getRowHeaderHoverSelectionStyle()
Returns theIStyle
that should be used to render hovered selected cells in a NatTable row header region.That means this
IStyle
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.ROW_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render hovered selected cells in a NatTable row header region.
-
getRowHeaderHoverSelectionCellPainter
protected abstract ICellPainter getRowHeaderHoverSelectionCellPainter()
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable row header region.That means this
ICellPainter
is registered againstDisplayMode.SELECT_HOVER
in the region with the region labelGridRegion.ROW_HEADER
.Note: This configuration is only working if the
HoverLayer
is part of the layer stack. Otherwise the configuration will not have any effect.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render hovered selected cells in a NatTable row header region.
-
configureDefaultSelectionStyle
protected void configureDefaultSelectionStyle(IConfigRegistry configRegistry)
Register default selection style configurations. Typically these configurations are used be the body region and will be overridden by more specific configurations of the header regions or custom styling based on labels.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getDefaultSelectionCellStyle
protected abstract IStyle getDefaultSelectionCellStyle()
- Returns:
- The
IStyle
that should be used by default to render selected cells in NatTable.
-
getDefaultSelectionCellPainter
protected abstract ICellPainter getDefaultSelectionCellPainter()
Returns the defaultICellPainter
that is used to render selected cells in NatTable.Typically this
ICellPainter
is used to render the body region and is overridden for other regions or other custom styling configurations based on labels.- Returns:
- The
ICellPainter
that should be used by default to render selected cells in NatTable.
-
configureColumnHeaderSelectionStyle
protected void configureColumnHeaderSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in a column header in a NatTable.By default this means to register the style configurations against
DisplayMode.SELECT
and config/region labelGridRegion.COLUMN_HEADER
. The styling for rendering full column selection is configured against the labelSelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getColumnHeaderSelectionStyle
protected abstract IStyle getColumnHeaderSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the column header of a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.COLUMN_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the column header in a NatTable.
-
getColumnHeaderSelectionCellPainter
protected abstract ICellPainter getColumnHeaderSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the column header of a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.COLUMN_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the column header in a NatTable.
-
getColumnHeaderFullSelectionStyle
protected abstract IStyle getColumnHeaderFullSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the column header of a NatTable when all cells in the column are selected.That means this
IStyle
is registered againstDisplayMode.SELECT
and the labelSelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the column header in a NatTable when all cells in the column are selected.
-
getColumnHeaderFullSelectionCellPainter
protected abstract ICellPainter getColumnHeaderFullSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the column header of a NatTable when all cells in the column are selected.That means this
ICellPainter
is registered againstDisplayMode.SELECT
and the labelSelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the column header in a NatTable when all cells in the column are selected.
-
configureRowHeaderSelectionStyle
protected void configureRowHeaderSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in a row header in a NatTable.By default this means to register the style configurations against
DisplayMode.SELECT
and config/region labelGridRegion.ROW_HEADER
. The styling for rendering full row selection is configured against the labelSelectionStyleLabels.ROW_FULLY_SELECTED_STYLE
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getRowHeaderSelectionStyle
protected abstract IStyle getRowHeaderSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the row header of a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.ROW_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the row header in a NatTable.
-
getRowHeaderSelectionCellPainter
protected abstract ICellPainter getRowHeaderSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the row header of a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.ROW_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the row header in a NatTable.
-
getRowHeaderFullSelectionStyle
protected abstract IStyle getRowHeaderFullSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the row header of a NatTable when all cells in the row are selected.That means this
IStyle
is registered againstDisplayMode.SELECT
and the labelSelectionStyleLabels.ROW_FULLY_SELECTED_STYLE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the row header in a NatTable when all cells in the row are selected.
-
getRowHeaderFullSelectionCellPainter
protected abstract ICellPainter getRowHeaderFullSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the row header of a NatTable when all cells in the row are selected.That means this
ICellPainter
is registered againstDisplayMode.SELECT
and the labelSelectionStyleLabels.ROW_FULLY_SELECTED_STYLE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the row header in a NatTable when all cells in the row are selected.
-
configureCornerSelectionStyle
protected void configureCornerSelectionStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the selection in the corner of a NatTable.By default this means to register the style configurations against
DisplayMode.SELECT
and config/region labelGridRegion.CORNER
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getCornerSelectionStyle
protected abstract IStyle getCornerSelectionStyle()
Returns theIStyle
that should be used to render the selected cells in the corner of a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.CORNER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the corner in a NatTable.
-
getCornerSelectionCellPainter
protected abstract ICellPainter getCornerSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected cells in the corner of a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT
in the region with the region labelGridRegion.CORNER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the corner in a NatTable.
-
configureSelectionAnchorStyle
protected void configureSelectionAnchorStyle(IConfigRegistry configRegistry)
Register the style configurations to render the selection anchor.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getSelectionAnchorStyle
protected abstract IStyle getSelectionAnchorStyle()
Returns theIStyle
that is used to render the selection anchor in normal display mode.That means this
IStyle
is registered againstDisplayMode.NORMAL
for the cell that contains the cell labelSelectionStyleLabels.SELECTION_ANCHOR_STYLE
.Typically only the border style is set here for a concise rendering.
- Returns:
- The
IStyle
that is used to render the selection anchor in normal display mode.
-
getSelectionAnchorCellPainter
protected abstract ICellPainter getSelectionAnchorCellPainter()
Returns theICellPainter
that is used to render the selection anchor in normal display mode.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
for the cell that contains the cell labelSelectionStyleLabels.SELECTION_ANCHOR_STYLE
.Typically there is no other painter registered for rendering selections, which simply causes different styling.
- Returns:
- The
ICellPainter
that is used to render the selection anchor in normal display mode.
-
getSelectionAnchorSelectionStyle
protected abstract IStyle getSelectionAnchorSelectionStyle()
Returns theIStyle
that is used to render the selection anchor in selection display mode.That means this
IStyle
is registered againstDisplayMode.SELECT
for the cell that contains the cell labelSelectionStyleLabels.SELECTION_ANCHOR_STYLE
.Typically the border style should be the same as used by
getSelectionAnchorStyle()
.- Returns:
- The
IStyle
that is used to render the selection anchor in selection display mode.
-
getSelectionAnchorSelectionCellPainter
protected abstract ICellPainter getSelectionAnchorSelectionCellPainter()
Returns theICellPainter
that is used to render the selection anchor in selection display mode.That means this
ICellPainter
is registered againstDisplayMode.SELECT
for the cell that contains the cell labelSelectionStyleLabels.SELECTION_ANCHOR_STYLE
.Typically there is no other painter registered for rendering selections, which simply causes different styling.
- Returns:
- The
ICellPainter
that is used to render the selection anchor in selection display mode.
-
getSelectionAnchorGridLineStyle
protected abstract IStyle getSelectionAnchorGridLineStyle()
Returns theIStyle
that should be used to render the grid lines around the selection anchor. That means this style will be registered against the labelSelectionStyleLabels.SELECTION_ANCHOR_GRID_LINE_STYLE
. It will be interpreted by theSelectionLayerPainter
which only checks theCellStyleAttributes.BORDER_STYLE
attribute. All other style configurations won't be interpreted.- Returns:
- The
IStyle
that should be used to render the grid lines around the selection anchor. - See Also:
SelectionLayerPainter
-
configureAlternatingRowStyle
protected void configureAlternatingRowStyle(IConfigRegistry configRegistry)
When creating a NatTable grid composition, using theDefaultGridLayerConfiguration
, theAlternatingRowConfigLabelAccumulator
is configured for the body region to apply labels for alternating rows. It applies the following labels for which this method registers styles:AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
AlternatingRowConfigLabelAccumulator
is not configured, this style configuration will have no effect.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getEvenRowStyle
protected abstract IStyle getEvenRowStyle()
Returns theIStyle
that should be used to render alternating rows.That means this
IStyle
is registered against the labelAlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that is used to render rows that contain the labelAlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
in the label stack.
-
getEvenRowCellPainter
protected abstract ICellPainter getEvenRowCellPainter()
Returns theICellPainter
that should be used to render alternating rows.That means this
ICellPainter
is registered against the labelAlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that is used to render rows that contain the labelAlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE
in the label stack.
-
getOddRowStyle
protected abstract IStyle getOddRowStyle()
Returns theIStyle
that should be used to render alternating rows.That means this
IStyle
is registered against the labelAlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that is used to render rows that contain the labelAlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE
in the label stack.
-
getOddRowCellPainter
protected abstract ICellPainter getOddRowCellPainter()
Returns theICellPainter
that should be used to render alternating rows.That means this
ICellPainter
is registered against the labelAlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that is used to render rows that contain the labelAlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE
in the label stack.
-
configureColumnGroupHeaderStyle
protected void configureColumnGroupHeaderStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the column group header in a NatTable.When adding the ColumnGroupHeaderLayer to a layer stack, there will be a new region with region label
GridRegion.COLUMN_GROUP_HEADER
. Typically it will share the same styling as the column header and have an internally configuredICellPainter
to render dependent on the state of the ColumnGroupModel.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getColumnGroupHeaderStyle
protected abstract IStyle getColumnGroupHeaderStyle()
Returns theIStyle
that should be used to render the column group header in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.COLUMN_GROUP_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the column group header in a NatTable.
-
getColumnGroupHeaderCellPainter
protected abstract ICellPainter getColumnGroupHeaderCellPainter()
Returns theICellPainter
that should be used to render the column group header in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.COLUMN_GROUP_HEADER
.If this method returns
null
the default configuration of the ColumnGroupHeaderLayer is used. By default the ColumnGroupHeaderTextPainter is registered to render icons corresponding to the expand/collapse state of the column group.- Returns:
- The
ICellPainter
that should be used to render the column group header in a NatTable.
-
configureRowGroupHeaderStyle
protected void configureRowGroupHeaderStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the row group header in a NatTable.When adding the RowGroupHeaderLayer to a layer stack, there will be a new region with region label
GridRegion.ROW_GROUP_HEADER
. Typically it will share the same styling as the row header and have an internally configuredICellPainter
to render dependent on the state of the RowGroupModel.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getRowGroupHeaderStyle
protected abstract IStyle getRowGroupHeaderStyle()
Returns theIStyle
that should be used to render the row group header in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.ROW_GROUP_HEADER
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the row group header in a NatTable.
-
getRowGroupHeaderCellPainter
protected abstract ICellPainter getRowGroupHeaderCellPainter()
Returns theICellPainter
that should be used to render the row group header in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.ROW_GROUP_HEADER
.If this method returns
null
the default configuration of the RowGroupHeaderLayer is used. By default the RowGroupHeaderTextPainter is registered to render icons corresponding to the expand/collapse state of the row group.- Returns:
- The
ICellPainter
that should be used to render the row group header in a NatTable.
-
configureSortHeaderStyle
protected void configureSortHeaderStyle(IConfigRegistry configRegistry)
This method is used to register styles for the sort header layer. It will register theIStyle
and theICellPainter
for both sort states which cause adding the following labels to the configuration label stack of a cell:- DefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
- DefaultSortConfiguration.SORT_UP_CONFIG_TYPE
ICellPainter
itself takes care about the sort state. If this needs to be handled differently, this method needs to be overridden.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getSortHeaderStyle
protected abstract IStyle getSortHeaderStyle()
Returns theIStyle
that should be used to render the sort header in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
for the configurations labelsDefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
andDefaultSortConfiguration.SORT_UP_CONFIG_TYPE
. If you need to configure different styles for different sort states, you need to overrideconfigureSortHeaderStyle(IConfigRegistry)
. Usually the default painter is taking care of the different sort states.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the sort header in a NatTable.
-
getSortHeaderCellPainter
protected abstract ICellPainter getSortHeaderCellPainter()
Returns theICellPainter
that should be used to render the sort header cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
for the configurations labelsDefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
andDefaultSortConfiguration.SORT_UP_CONFIG_TYPE
. If you need to configure different painters for different sort states, you need to overrideconfigureSortHeaderStyle(IConfigRegistry)
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the sort header in a NatTable.
-
configureSelectedSortHeaderStyle
protected void configureSelectedSortHeaderStyle(IConfigRegistry configRegistry)
This method is used to register styles for the selected sort header layer. It will register theIStyle
and theICellPainter
for both sort states which cause adding the following labels to the configuration label stack of a cell:- DefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
- DefaultSortConfiguration.SORT_UP_CONFIG_TYPE
ICellPainter
itself takes care about the sort state. If this needs to be handled differently, this method needs to be overridden.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getSelectedSortHeaderStyle
protected abstract IStyle getSelectedSortHeaderStyle()
Returns theIStyle
that should be used to render the sort header in a NatTable in selected state.That means this
IStyle
is registered againstDisplayMode.SELECT
for the configurations labelsDefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
andDefaultSortConfiguration.SORT_UP_CONFIG_TYPE
. If you need to configure different styles for different sort states, you need to overrideconfigureSortHeaderStyle(IConfigRegistry)
. Usually the default painter is taking care of the different sort states.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the selected sort header in a NatTable.
-
getSelectedSortHeaderCellPainter
protected abstract ICellPainter getSelectedSortHeaderCellPainter()
Returns theICellPainter
that should be used to render the sort header cells in a NatTable in selected state.That means this
ICellPainter
is registered againstDisplayMode.SELECT
for the configurations labelsDefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE
andDefaultSortConfiguration.SORT_UP_CONFIG_TYPE
. If you need to configure different painters for different sort states, you need to overrideconfigureSortHeaderStyle(IConfigRegistry)
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the selected sort header in a NatTable.
-
configureFilterRowStyle
protected void configureFilterRowStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for the filter row. It will only be applied in case the FilterRowHeaderLayer is involved, which introduces a new region that is recognised byGridRegion.FILTER_ROW
.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getFilterRowStyle
protected abstract IStyle getFilterRowStyle()
Returns theIStyle
that should be used to render the filter row in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.FILTER_ROW
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the filter row in a NatTable.
-
getFilterRowCellPainter
protected abstract ICellPainter getFilterRowCellPainter()
Returns theICellPainter
that should be used to render the filter row cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
in the region with the region labelGridRegion.FILTER_ROW
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the filter row in a NatTable.
-
configureTreeStyle
protected void configureTreeStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for a tree representation. It will only be applied in case a TreeLayer is involved, which adds the configuration labelTreeLayer.TREE_COLUMN_CELL
to the tree column.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getTreeStyle
protected abstract IStyle getTreeStyle()
Returns theIStyle
that should be used to render the tree column cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
and the configuration labelTreeLayer.TREE_COLUMN_CELL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the tree column in a NatTable.
-
getTreeCellPainter
protected abstract ICellPainter getTreeCellPainter()
Returns theICellPainter
that should be used to render the tree column cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
and the configuration labelTreeLayer.TREE_COLUMN_CELL
.- Returns:
- The
ICellPainter
that should be used to render the tree column in a NatTable.
-
getTreeSelectionStyle
protected abstract IStyle getTreeSelectionStyle()
Returns theIStyle
that should be used to render the selected tree column cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT
and the configuration labelTreeLayer.TREE_COLUMN_CELL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the selected tree column in a NatTable.
-
getTreeSelectionCellPainter
protected abstract ICellPainter getTreeSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected tree column cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT
and the configuration labelTreeLayer.TREE_COLUMN_CELL
.- Returns:
- The
ICellPainter
that should be used to render the selected tree column in a NatTable.
-
getTreeStructurePainter
protected abstract ICellPainter getTreeStructurePainter()
Returns theICellPainter
that should be used to render the tree structure in a NatTable. It needs to be anIndentedTreeImagePainter
to show the expand/collapsed state aswell as the indentation for the tree level. It that can be wrapped with severalCellPainterWrapper
. If there is noIndentedTreeImagePainter
in the painter hierarchy, this configuration attribute will be ignored by the TreeLayer.- Returns:
- The
IndentedTreeImagePainter
that should be used to render the tree structure in a NatTable.
-
getTreeStructureSelectionPainter
protected abstract ICellPainter getTreeStructureSelectionPainter()
Returns theICellPainter
that should be used to render the selected tree structure in a NatTable. It needs to be anIndentedTreeImagePainter
to show the expand/collapsed state aswell as the indentation for the tree level. It that can be wrapped with severalCellPainterWrapper
. If there is noIndentedTreeImagePainter
in the painter hierarchy, this configuration attribute will be ignored by the TreeLayer.- Returns:
- The
IndentedTreeImagePainter
that should be used to render the selected tree structure in a NatTable.
-
configureSummaryRowStyle
protected void configureSummaryRowStyle(IConfigRegistry configRegistry)
This method is used to register style configurations for a summary row. It will only be applied in case a SummaryRowLayer is involved, which adds the configuration labelSummaryRowLayer.DEFAULT_SUMMARY_ROW_CONFIG_LABEL
to the summary row.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getSummaryRowStyle
protected abstract IStyle getSummaryRowStyle()
Returns theIStyle
that should be used to render the summary row cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.NORMAL
and the configuration labelSummaryRowLayer.DEFAULT_SUMMARY_ROW_CONFIG_LABEL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the summary row in a NatTable.
-
getSummaryRowCellPainter
protected abstract ICellPainter getSummaryRowCellPainter()
Returns theICellPainter
that should be used to render the summary row cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.NORMAL
and the configuration labelSummaryRowLayer.DEFAULT_SUMMARY_ROW_CONFIG_LABEL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the summary row in a NatTable.
-
getSummaryRowSelectionStyle
protected abstract IStyle getSummaryRowSelectionStyle()
Returns theIStyle
that should be used to render the selected summary row cells in a NatTable.That means this
IStyle
is registered againstDisplayMode.SELECT
and the configuration labelSummaryRowLayer.DEFAULT_SUMMARY_ROW_CONFIG_LABEL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
IStyle
that should be used to render the selected summary row cells in a NatTable.
-
getSummaryRowSelectionCellPainter
protected abstract ICellPainter getSummaryRowSelectionCellPainter()
Returns theICellPainter
that should be used to render the selected summary row cells in a NatTable.That means this
ICellPainter
is registered againstDisplayMode.SELECT
and the configuration labelSummaryRowLayer.DEFAULT_SUMMARY_ROW_CONFIG_LABEL
.If this method returns
null
, no value will be registered to keep the IConfigRegistry clean. The result would be the same, as if no value is found in the IConfigRegistry. In this case the rendering will fallback to the default configuration.- Returns:
- The
ICellPainter
that should be used to render the selected summary row cells in a NatTable.
-
configureFreezeStyle
protected void configureFreezeStyle(IConfigRegistry configRegistry)
This method is used to register the style attributes for freeze rendering. This mainly means to specify the color that is used to render the freeze separator.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getFreezeSeparatorColor
protected abstract org.eclipse.swt.graphics.Color getFreezeSeparatorColor()
Returns theColor
that should be used to render the freeze separator. Ifnull
is returned, the default separator color will be used.- Returns:
- The
Color
that should be used to render the freeze separator.
-
getFreezeSeparatorWidth
protected abstract Integer getFreezeSeparatorWidth()
Returns the width that should be used by the freeze separator. Ifnull
is returned, the default width of 1 pixel will be used.- Returns:
- The width of the freeze separator.
- Since:
- 2.0
-
configureGridLineStyle
protected void configureGridLineStyle(IConfigRegistry configRegistry)
This method is used to register the grid line styling, which consists of grid line color and the configuration if grid lines should be rendered or not. These configurations will be interpreted by the GridLineCellLayerPainter.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGridLineColor
protected abstract org.eclipse.swt.graphics.Color getGridLineColor()
Returns theColor
that should be used to render the grid lines. Ifnull
is returned, the default grid line color will be used.- Returns:
- The
Color
that should be used to render the grid lines.
-
getRenderColumnHeaderGridLines
protected abstract Boolean getRenderColumnHeaderGridLines()
Returns whether grid lines in the column header should be rendered or not.That means this configuration is registered against
DisplayMode.NORMAL
and the configuration labelGridRegion.COLUMN_HEADER
.- Returns:
true
if grid lines in the column header region should be rendered,false
if not.
-
getRenderCornerGridLines
protected abstract Boolean getRenderCornerGridLines()
Returns whether grid lines in the corner region should be rendered or not.That means this configuration is registered against
DisplayMode.NORMAL
and the configuration labelGridRegion.CORNER
.- Returns:
true
if grid lines in the corner region should be rendered,false
if not.
-
getRenderRowHeaderGridLines
protected abstract Boolean getRenderRowHeaderGridLines()
Returns whether grid lines in the row header should be rendered or not.That means this configuration is registered against
DisplayMode.NORMAL
and the configuration labelGridRegion.ROW_HEADER
.- Returns:
true
if grid lines in the row header region should be rendered,false
if not.
-
getRenderBodyGridLines
protected abstract Boolean getRenderBodyGridLines()
Returns whether grid lines in the body should be rendered or not.That means this configuration is registered against
DisplayMode.NORMAL
and the configuration labelGridRegion.BODY
.- Returns:
true
if grid lines in the body region should be rendered,false
if not.
-
getRenderFilterRowGridLines
protected abstract Boolean getRenderFilterRowGridLines()
Returns whether grid lines in the filter row should be rendered or not.That means this configuration is registered against
DisplayMode.NORMAL
and the configuration labelGridRegion.FILTER_ROW
.- Returns:
true
if grid lines in the filter row should be rendered,false
if not.
-
configureEditErrorStyle
protected void configureEditErrorStyle(IConfigRegistry configRegistry)
This method is used to register the styles that should be applied to an editor control in case of conversion/validation errors.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getConversionErrorStyle
protected abstract IStyle getConversionErrorStyle()
Returns theIStyle
that should be applied to an editor in case the input is invalid in terms of conversion errors.That means the
EditConfigAttributes.CONVERSION_ERROR_STYLE
configuration is registered againstDisplayMode.EDIT
.Note that only style informations for foreground colour, background colour and font are interpreted, as the style informations will be applied to the underlying editor control.
Currently mainly the TextCellEditor is using this
IStyle
via RenderErrorHandling and the TableCellEditor.If this method returns
null
, the default behaviour of using a red foreground colour will be used on conversion errors.- Returns:
- The
IStyle
that should be applied to an editor control in case of conversion errors.
-
getValidationErrorStyle
protected abstract IStyle getValidationErrorStyle()
Returns theIStyle
that should be applied to an editor in case the input is invalid in terms of validation errors.That means the
EditConfigAttributes.VALIDATION_ERROR_STYLE
configuration is registered againstDisplayMode.EDIT
.Note that only style informations for foreground colour, background colour and font are interpreted, as the style informations will be applied to the underlying editor control.
Currently mainly the TextCellEditor is using this
IStyle
via RenderErrorHandling and the TableCellEditor.If this method returns
null
, the default behaviour of using a red foreground colour will be used on validation errors.- Returns:
- The
IStyle
that should be applied to an editor control in case of validation errors.
-
configureFillHandleStyle
protected void configureFillHandleStyle(IConfigRegistry configRegistry)
Register the style configurations to render the fill handle.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.- Since:
- 1.5
-
getFillHandleColor
protected abstract org.eclipse.swt.graphics.Color getFillHandleColor()
Returns theColor
that should be used to render the fill handle.- Returns:
- The
Color
that should be used to render the fill handle. - Since:
- 1.5
-
getFillHandleBorderStyle
protected abstract BorderStyle getFillHandleBorderStyle()
Returns theBorderStyle
that should be used to render the border of the fill handle.- Returns:
- The
BorderStyle
that should be used to render the border of the fill handle. - Since:
- 1.5
-
getFillHandleRegionBorderStyle
protected abstract BorderStyle getFillHandleRegionBorderStyle()
Returns theBorderStyle
that should be used to render the border around the fill handle region.- Returns:
- The
BorderStyle
that should be used to render the border around the fill handle region. - Since:
- 1.5
-
configureCopyBorderStyle
protected void configureCopyBorderStyle(IConfigRegistry configRegistry)
Register the style configurations to render the copy border.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.- Since:
- 1.5
-
getCopyBorderStyle
protected abstract IStyle getCopyBorderStyle()
Returns theIStyle
that should be used to render the copy border. That means this style will be registered against the labelSelectionStyleLabels.COPY_BORDER_STYLE
. Only theCellStyleAttributes.BORDER_STYLE
attribute will be interpreted.- Returns:
- The
IStyle
that should be used to render the copy border. - Since:
- 1.5
-
configureDataChangeStyle
protected void configureDataChangeStyle(IConfigRegistry configRegistry)
Register the style configurations to render cells in dirty state.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.- Since:
- 2.0
-
getDataChangeStyle
protected abstract IStyle getDataChangeStyle()
Returns theIStyle
that should be used to render dirty cells inDisplayMode.NORMAL
. That means this style will be registered against the labelDataChangeLayer.DIRTY
.- Returns:
- The
IStyle
that should be used to render dirty cells. - Since:
- 2.0
-
getDataChangeSelectionStyle
protected abstract IStyle getDataChangeSelectionStyle()
Returns theIStyle
that should be used to render dirty cells inDisplayMode.SELECT
. That means this style will be registered against the labelDataChangeLayer.DIRTY
.- Returns:
- The
IStyle
that should be used to render dirty cells. - Since:
- 2.0
-
configureHideIndicatorStyle
protected void configureHideIndicatorStyle(IConfigRegistry configRegistry)
Register the style configurations for rendering the hide indicator.- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.- Since:
- 2.0
-
getHideIndicatorColor
protected abstract org.eclipse.swt.graphics.Color getHideIndicatorColor()
Returns theColor
that should be used to render the hide indicator . Ifnull
is returned, the default color will be used.- Returns:
- The
Color
that should be used to render the hide indicator. - Since:
- 2.0
-
getHideIndicatorWidth
protected abstract Integer getHideIndicatorWidth()
Returns the width that should be used by the hide indicator. Ifnull
is returned, the default width of 1 pixel will be used.- Returns:
- The width of the hide indicator.
- Since:
- 2.0
-
isStyleEmpty
public static boolean isStyleEmpty(IStyle style)
Null-safe check if aIStyle
is empty or not.- Parameters:
style
- TheIStyle
to check.- Returns:
true
if the givenIStyle
isnull
or has no value set for anyCellStyleAttributes
,false
if at least one attribute is set.
-
unregisterThemeStyleConfigurations
public void unregisterThemeStyleConfigurations(IConfigRegistry configRegistry)
Unregister the style configurations that were applied by this ThemeConfiguration. This is necessary to ensure a clean IConfigRegistry state before applying a new ThemeConfiguration. Otherwise it would be possible to accidentally mix style configurations.It will only unregister configurations that were applied by this ThemeConfiguration. This means for every configuration a check is performed whether there is a value configured in this theme or not. This ensures to not removing configurations that are set somewhere else, e.g. the ICellPainter that is used for the column group header is registered internally by the layer itself, if the theme doesn't change it, it also shouldn't unregister it in case of theme changes.
- Parameters:
configRegistry
- The IConfigRegistry that is used by the NatTable instance to which the style configurations were applied to.
-
addThemeExtension
public void addThemeExtension(IThemeExtension extension)
Adds an IThemeExtension to this ThemeConfiguration which adds additional styling configuration on top.- Parameters:
extension
- The IThemeExtension that should be added to this ThemeConfiguration.
-
removeThemeExtension
public void removeThemeExtension(IThemeExtension extension)
Removes an IThemeExtension that was added to this ThemeConfiguration before.- Parameters:
extension
- The IThemeExtension that should be removed from this ThemeConfiguration.
-
-