Class ThemeConfiguration
- All Implemented Interfaces:
IConfiguration
- Direct Known Subclasses:
DefaultNatTableThemeConfiguration
IConfiguration
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
Modifier and TypeFieldDescriptionprotected final ArrayList<IThemeExtension>
Collection ofIThemeExtension
that should be added to this ThemeConfiguration.protected boolean
Flag to configure whether the corner should be styled like the column header in a grid composition. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
This method should be used to create theICellPainter
instances.protected abstract ICellPainter
Returns theICellPainter
that should be used to render hovered cells in a NatTable body region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable body region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered selected cells in a NatTable body region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered cells in a NatTable body region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the column group header in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the column group header in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the column header in a NatTable.protected abstract ICellPainter
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
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
Returns theICellPainter
that should be used to render hovered cells in a NatTable column header region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable column header region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered selected cells in a NatTable column header region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered cells in a NatTable column header region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected cells in the column header of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the selected cells in the column header of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the column header in a NatTable.protected abstract IStyle
Returns theIStyle
that should be applied to an editor in case the input is invalid in terms of conversion errors.protected abstract IStyle
Returns theIStyle
that should be used to render the copy border.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the corner in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected cells in the corner of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the selected cells in the corner of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the corner of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render dirty cells inDisplayMode.SELECT
.protected abstract IStyle
Returns theIStyle
that should be used to render dirty cells inDisplayMode.NORMAL
.protected abstract ICellPainter
Returns the defaultICellPainter
that is used to render the NatTable.protected abstract IStyle
protected abstract ICellPainter
Returns theICellPainter
that should be used by default to render hovered cells in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used by default to render hovered selected cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used by default to render hovered selected cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used by default to render hovered cells in a NatTable.protected abstract ICellPainter
Returns the defaultICellPainter
that is used to render selected cells in NatTable.protected abstract IStyle
protected abstract ICellPainter
Returns theICellPainter
that should be used to render alternating rows.protected abstract IStyle
Returns theIStyle
that should be used to render alternating rows.protected abstract BorderStyle
Returns theBorderStyle
that should be used to render the border of the fill handle.protected abstract org.eclipse.swt.graphics.Color
Returns theColor
that should be used to render the fill handle.protected abstract BorderStyle
Returns theBorderStyle
that should be used to render the border around the fill handle region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the filter row cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the filter row in a NatTable.protected abstract org.eclipse.swt.graphics.Color
Returns theColor
that should be used to render the freeze separator.protected abstract Integer
Returns the width that should be used by the freeze separator.protected abstract org.eclipse.swt.graphics.Color
Returns theColor
that should be used to render the grid lines.protected abstract org.eclipse.swt.graphics.Color
Returns theColor
that should be used to render the hide indicator .protected abstract Integer
Returns the width that should be used by the hide indicator.protected abstract ICellPainter
Returns theICellPainter
that should be used to render alternating rows.protected abstract IStyle
Returns theIStyle
that should be used to render alternating rows.protected abstract Boolean
Returns whether grid lines in the body should be rendered or not.protected abstract Boolean
Returns whether grid lines in the column header should be rendered or not.protected abstract Boolean
Returns whether grid lines in the corner region should be rendered or not.protected abstract Boolean
Returns whether grid lines in the filter row should be rendered or not.protected abstract Boolean
Returns whether grid lines in the row header should be rendered or not.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the row group header in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the row group header in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the row header in a NatTable.protected abstract ICellPainter
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
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
Returns theICellPainter
that should be used to render hovered cells in a NatTable row header region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render hovered selected cells in a NatTable row header region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered selected cells in a NatTable row header region.protected abstract IStyle
Returns theIStyle
that should be used to render hovered cells in a NatTable row header region.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected cells in the row header of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the selected cells in the row header of a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the row header in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the sort header cells in a NatTable in selected state.protected abstract IStyle
Returns theIStyle
that should be used to render the sort header in a NatTable in selected state.protected abstract ICellPainter
Returns theICellPainter
that is used to render the selection anchor in normal display mode.protected abstract IStyle
Returns theIStyle
that should be used to render the grid lines around the selection anchor.protected abstract ICellPainter
Returns theICellPainter
that is used to render the selection anchor in selection display mode.protected abstract IStyle
Returns theIStyle
that is used to render the selection anchor in selection display mode.protected abstract IStyle
Returns theIStyle
that is used to render the selection anchor in normal display mode.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the sort header cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the sort header in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the summary row cells in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected summary row cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the selected summary row cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the summary row cells in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the tree column cells in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected tree column cells in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the selected tree column cells in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the tree structure in a NatTable.protected abstract ICellPainter
Returns theICellPainter
that should be used to render the selected tree structure in a NatTable.protected abstract IStyle
Returns theIStyle
that should be used to render the tree column cells in a NatTable.protected abstract IStyle
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 Details
-
styleCornerLikeColumnHeader
protected boolean styleCornerLikeColumnHeaderFlag 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
Collection ofIThemeExtension
that should be added to this ThemeConfiguration.
-
-
Constructor Details
-
ThemeConfiguration
public ThemeConfiguration()
-
-
Method Details
-
configureRegistry
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
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
- Returns:
- The
IStyle
that should be used by default to render NatTable.
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- Returns:
- The
IStyle
that should be used by default to render selected cells in NatTable.
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
-
configureAlternatingRowStyle
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Removes an IThemeExtension that was added to this ThemeConfiguration before.- Parameters:
extension
- The IThemeExtension that should be removed from this ThemeConfiguration.
-