Class DefaultGroupByThemeExtension
- All Implemented Interfaces:
IThemeExtension
- Direct Known Subclasses:
ModernGroupByThemeExtension
Note: It is not possible to change the ICellPainter via this default
theme configuration. The reason for this is that the implementation
GroupByHeaderPainter contains several technical details that are
necessary to make the GroupBy feature work as it is. Changing the painter
could break the feature.
Note: Simply changing the font doesn't result in automatically resizing the GroupBy header height. This is the same as for all other layers too, as for calculation of the row height, the GC is necessary. To support also bigger fonts in the GroupBy header region, you are able to resize the GroupBy header manually like this:
natTable.doCommand(new RowResizeCommand(groupByHeaderLayer, 0, 50));
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Image -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureGroupByHeaderBackgroundColor(IConfigRegistry configRegistry) Registering the background color for the GroupBy header region.protected voidconfigureGroupByHint(IConfigRegistry configRegistry) Method to configure the styling of the GroupBy hint in the GroupBy header.protected voidconfigureGroupByObjectSelectionStyle(IConfigRegistry configRegistry) Registering the style configuration for the selected GroupBy objects.protected voidconfigureGroupByObjectStyle(IConfigRegistry configRegistry) Registering the style configuration for the GroupBy objects.protected voidconfigureGroupByStyle(IConfigRegistry configRegistry) Registering the style configuration for the GroupBy header region.protected voidconfigureGroupBySummarySelectionStyle(IConfigRegistry configRegistry) Registering the style configuration for the selected GroupBy summary.protected voidconfigureGroupBySummaryStyle(IConfigRegistry configRegistry) Registering the style configuration for the GroupBy summary.voidMethod that is used to create the painter instances that should be registered for styling.protected org.eclipse.swt.graphics.ColorReturns theColorthat should be used to render the group by header background.protected Stringprotected IStyleprotected ICellPainterReturns theICellPainterthat should be used to render the GroupBy object row cells in a NatTable.protected ICellPainterReturns theICellPainterthat should be used to render the selected GroupBy object row cells in a NatTable.protected IStyleReturns theIStylethat should be used to render the selected GroupBy object rows in a NatTable.protected IStyleReturns theIStylethat should be used to render the GroupBy object rows in a NatTable.protected IStyleReturns theIStylethat should be used to render the GroupBy region in a NatTable.protected ICellPainterReturns theICellPainterthat should be used to render the GroupBy row summary cells in a NatTable.protected ICellPainterReturns theICellPainterthat should be used to render the selected GroupBy row summary cells in a NatTable.protected IStyleReturns theIStylethat should be used to render the selected GroupBy row summary cells in a NatTable.protected IStyleReturns theIStylethat should be used to render the GroupBy row summary cells in a NatTable.voidregisterStyles(IConfigRegistry configRegistry) Register the style configurations that should be added by this IThemeExtension.voidunregisterStyles(IConfigRegistry configRegistry) Unregister the style configurations that were registered by this IThemeExtension.
-
Field Details
-
groupByHeaderBgColor
public org.eclipse.swt.graphics.Color groupByHeaderBgColor -
groupByBgColor
public org.eclipse.swt.graphics.Color groupByBgColor -
groupByFgColor
public org.eclipse.swt.graphics.Color groupByFgColor -
groupByGradientBgColor
public org.eclipse.swt.graphics.Color groupByGradientBgColor -
groupByGradientFgColor
public org.eclipse.swt.graphics.Color groupByGradientFgColor -
groupByHAlign
-
groupByVAlign
-
groupByFont
public org.eclipse.swt.graphics.Font groupByFont -
groupByImage
public org.eclipse.swt.graphics.Image groupByImage -
groupByBorderStyle
-
groupByPWEchoChar
-
groupByTextDecoration
-
groupByObjectBgColor
public org.eclipse.swt.graphics.Color groupByObjectBgColor -
groupByObjectFgColor
public org.eclipse.swt.graphics.Color groupByObjectFgColor -
groupByObjectGradientBgColor
public org.eclipse.swt.graphics.Color groupByObjectGradientBgColor -
groupByObjectGradientFgColor
public org.eclipse.swt.graphics.Color groupByObjectGradientFgColor -
groupByObjectHAlign
-
groupByObjectVAlign
-
groupByObjectFont
public org.eclipse.swt.graphics.Font groupByObjectFont -
groupByObjectImage
public org.eclipse.swt.graphics.Image groupByObjectImage -
groupByObjectBorderStyle
-
groupByObjectPWEchoChar
-
groupByObjectTextDecoration
-
groupByObjectCellPainter
-
groupByObjectSelectionBgColor
public org.eclipse.swt.graphics.Color groupByObjectSelectionBgColor -
groupByObjectSelectionFgColor
public org.eclipse.swt.graphics.Color groupByObjectSelectionFgColor -
groupByObjectSelectionGradientBgColor
public org.eclipse.swt.graphics.Color groupByObjectSelectionGradientBgColor -
groupByObjectSelectionGradientFgColor
public org.eclipse.swt.graphics.Color groupByObjectSelectionGradientFgColor -
groupByObjectSelectionHAlign
-
groupByObjectSelectionVAlign
-
groupByObjectSelectionFont
public org.eclipse.swt.graphics.Font groupByObjectSelectionFont -
groupByObjectSelectionImage
public org.eclipse.swt.graphics.Image groupByObjectSelectionImage -
groupByObjectSelectionBorderStyle
-
groupByObjectSelectionPWEchoChar
-
groupByObjectSelectionTextDecoration
-
groupByObjectSelectionCellPainter
-
groupBySummaryBgColor
public org.eclipse.swt.graphics.Color groupBySummaryBgColor -
groupBySummaryFgColor
public org.eclipse.swt.graphics.Color groupBySummaryFgColor -
groupBySummaryGradientBgColor
public org.eclipse.swt.graphics.Color groupBySummaryGradientBgColor -
groupBySummaryGradientFgColor
public org.eclipse.swt.graphics.Color groupBySummaryGradientFgColor -
groupBySummaryHAlign
-
groupBySummaryVAlign
-
groupBySummaryFont
public org.eclipse.swt.graphics.Font groupBySummaryFont -
groupBySummaryImage
public org.eclipse.swt.graphics.Image groupBySummaryImage -
groupBySummaryBorderStyle
-
groupBySummaryPWEchoChar
-
groupBySummaryTextDecoration
-
groupBySummaryCellPainter
-
groupBySummarySelectionBgColor
public org.eclipse.swt.graphics.Color groupBySummarySelectionBgColor -
groupBySummarySelectionFgColor
public org.eclipse.swt.graphics.Color groupBySummarySelectionFgColor -
groupBySummarySelectionGradientBgColor
public org.eclipse.swt.graphics.Color groupBySummarySelectionGradientBgColor -
groupBySummarySelectionGradientFgColor
public org.eclipse.swt.graphics.Color groupBySummarySelectionGradientFgColor -
groupBySummarySelectionHAlign
-
groupBySummarySelectionVAlign
-
groupBySummarySelectionFont
public org.eclipse.swt.graphics.Font groupBySummarySelectionFont -
groupBySummarySelectionImage
public org.eclipse.swt.graphics.Image groupBySummarySelectionImage -
groupBySummarySelectionBorderStyle
-
groupBySummarySelectionPWEchoChar
-
groupBySummarySelectionTextDecoration
-
groupBySummarySelectionCellPainter
-
groupByHint
-
groupByHintBgColor
public org.eclipse.swt.graphics.Color groupByHintBgColor -
groupByHintFgColor
public org.eclipse.swt.graphics.Color groupByHintFgColor -
groupByHintGradientBgColor
public org.eclipse.swt.graphics.Color groupByHintGradientBgColor -
groupByHintGradientFgColor
public org.eclipse.swt.graphics.Color groupByHintGradientFgColor -
groupByHintHAlign
-
groupByHintVAlign
-
groupByHintFont
public org.eclipse.swt.graphics.Font groupByHintFont -
groupByHintImage
public org.eclipse.swt.graphics.Image groupByHintImage -
groupByHintBorderStyle
-
groupByHintPWEchoChar
-
groupByHintTextDecoration
-
-
Constructor Details
-
DefaultGroupByThemeExtension
public DefaultGroupByThemeExtension()
-
-
Method Details
-
createPainterInstances
public void createPainterInstances()Description copied from interface:IThemeExtensionMethod that is used to create the painter instances that should be registered for styling. Needed to update painters in case zoom operations- Specified by:
createPainterInstancesin interfaceIThemeExtension
-
registerStyles
Description copied from interface:IThemeExtensionRegister the style configurations that should be added by this IThemeExtension.- Specified by:
registerStylesin interfaceIThemeExtension- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configurations should be registered.
-
configureGroupByHeaderBackgroundColor
Registering the background color for the GroupBy header region.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupByHeaderBackgroundColor
protected org.eclipse.swt.graphics.Color getGroupByHeaderBackgroundColor()Returns theColorthat should be used to render the group by header background. Ifnullis returned, the default color will be used.- Returns:
- The
Colorthat should be used to render group by header background.
-
configureGroupByStyle
Registering the style configuration for the GroupBy header region. Note that it is not possible to exchange the ICellPainter that is used to render the GroupBy header region, as it contains a lot of internal code.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupByStyle
Returns theIStylethat should be used to render the GroupBy region in a NatTable.That means this
IStyleis registered againstDisplayMode.NORMALand the configuration labelGroupByHeaderLayer.GROUP_BY_REGION.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
IStylethat should be used to render the GroupBy region in a NatTable.
-
configureGroupByObjectStyle
Registering the style configuration for the GroupBy objects.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupByObjectStyle
Returns theIStylethat should be used to render the GroupBy object rows in a NatTable.That means this
IStyleis registered againstDisplayMode.NORMALand the configuration labelGroupByDataLayer.GROUP_BY_OBJECT.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
IStylethat should be used to render the GroupBy object rows in a NatTable.
-
getGroupByObjectCellPainter
Returns theICellPainterthat should be used to render the GroupBy object row cells in a NatTable. Typically you should use aGroupByCellTextPainteris most inner cell painter, as it is configured to only render group by content like group by summary and tree cells.That means this
ICellPainteris registered againstDisplayMode.NORMALand the configuration labelGroupByDataLayer.GROUP_BY_OBJECT.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
ICellPainterthat should be used to render the GroupBy object row cells in a NatTable.
-
configureGroupByObjectSelectionStyle
Registering the style configuration for the selected GroupBy objects.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupByObjectSelectionStyle
Returns theIStylethat should be used to render the selected GroupBy object rows in a NatTable.That means this
IStyleis registered againstDisplayMode.SELECTand the configuration labelGroupByDataLayer.GROUP_BY_OBJECT.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
IStylethat should be used to render the selected GroupBy object rows in a NatTable.
-
getGroupByObjectSelectionCellPainter
Returns theICellPainterthat should be used to render the selected GroupBy object row cells in a NatTable. Typically you should use aGroupByCellTextPainteris most inner cell painter, as it is configured to only render group by content like group by summary and tree cells.That means this
ICellPainteris registered againstDisplayMode.SELECTand the configuration labelGroupByDataLayer.GROUP_BY_OBJECT.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
ICellPainterthat should be used to render the selected GroupBy object row cells in a NatTable.
-
configureGroupBySummaryStyle
Registering the style configuration for the GroupBy summary.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupBySummaryStyle
Returns theIStylethat should be used to render the GroupBy row summary cells in a NatTable.That means this
IStyleis registered againstDisplayMode.NORMALand the configuration labelGroupByDataLayer.GROUP_BY_SUMMARY.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
IStylethat should be used to render the GroupBy summary row cells in a NatTable.
-
getGroupBySummaryCellPainter
Returns theICellPainterthat should be used to render the GroupBy row summary cells in a NatTable. Typically you should use aGroupByCellTextPainteris most inner cell painter, as it is configured to only render group by content like group by summary and tree cells.That means this
ICellPainteris registered againstDisplayMode.NORMALand the configuration labelGroupByDataLayer.GROUP_BY_SUMMARY.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
ICellPainterthat should be used to render the GroupBy row summary cells in a NatTable.
-
configureGroupBySummarySelectionStyle
Registering the style configuration for the selected GroupBy summary.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupBySummarySelectionStyle
Returns theIStylethat should be used to render the selected GroupBy row summary cells in a NatTable.That means this
IStyleis registered againstDisplayMode.SELECTand the configuration labelGroupByDataLayer.GROUP_BY_SUMMARY.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
IStylethat should be used to render the selected GroupBy summary row cells in a NatTable.
-
getGroupBySummarySelectionCellPainter
Returns theICellPainterthat should be used to render the selected GroupBy row summary cells in a NatTable. Typically you should use aGroupByCellTextPainteris most inner cell painter, as it is configured to only render group by content like group by summary and tree cells.That means this
ICellPainteris registered againstDisplayMode.SELECTand the configuration labelGroupByDataLayer.GROUP_BY_SUMMARY.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
ICellPainterthat should be used to render the selected GroupBy row summary cells in a NatTable.
-
configureGroupByHint
Method to configure the styling of the GroupBy hint in the GroupBy header.The GroupBy hint is usually rendered by the GroupByHeaderPainter. If you registered a different
ICellPainterfor the GroupByHeaderLayer, this might not be interpreted.- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configuration should be applied to.
-
getGroupByHint
- Returns:
- The hint that should be rendered in case there is no grouping applied.
-
getGroupByHintStyle
- Returns:
- The
IStylethat should be used to render the GroupBy hint.
-
unregisterStyles
Description copied from interface:IThemeExtensionUnregister the style configurations that were registered by this IThemeExtension.- Specified by:
unregisterStylesin interfaceIThemeExtension- Parameters:
configRegistry- The IConfigRegistry that is used by the NatTable instance to which the style configurations were applied to.
-