Class HideIndicatorOverlayPainter
java.lang.Object
org.eclipse.nebula.widgets.nattable.hideshow.indicator.HideIndicatorOverlayPainter
- All Implemented Interfaces:
IOverlayPainter,IOverlayPainter2
- Direct Known Subclasses:
HierarchicalHideIndicatorOverlayPainter
Overlay painter that is used to render an indicator for hidden columns or
rows.
- Since:
- 1.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ILayerprotected IConfigRegistryTheIConfigRegistrythat should be used to retrieve the color to use for rendering the hide indicator.protected ILayer -
Constructor Summary
ConstructorsConstructorDescriptionHideIndicatorOverlayPainter(ILayer columnHeaderLayer, ILayer rowHeaderLayer) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.graphics.ColorChecks if aIConfigRegistryis set to this HideIndicatorOverlayPainter and will try to extract the configuration value forHideIndicatorConfigAttributes.HIDE_INDICATOR_COLOR.intChecks if aIConfigRegistryis set to this HideIndicatorOverlayPainter and will try to extract the configuration value forHideIndicatorConfigAttributes.HIDE_INDICATOR_LINE_WIDTH.protected voidpaintHiddenColumnIndicator(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Renders the indicator for hidden columns.protected voidpaintHiddenRowIndicator(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Renders the indicator for hidden rows.voidpaintOverlay(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Render an overlay over the painted layers.voidpaintOverlay(org.eclipse.swt.graphics.GC gc, ILayer layer) voidsetConfigRegistry(IConfigRegistry configRegistry) Sets theIConfigRegistryto this HideIndicatorOverlayPainter.voidsetIndicatorColor(org.eclipse.swt.graphics.Color indicatorColor) voidsetIndicatorLineWidth(int lineWidth) voidsetLayerOnTop(ILayer layer) voidsetLayerToLeft(ILayer layer)
-
Field Details
-
columnHeaderLayer
-
rowHeaderLayer
-
configRegistry
TheIConfigRegistrythat should be used to retrieve the color to use for rendering the hide indicator. If set tonull, the locally set color will be used.
-
-
Constructor Details
-
HideIndicatorOverlayPainter
- Parameters:
columnHeaderLayer- The layer in the column header that should be used to determine the height of the hidden column indicator. Should be the top most layer in the column header region, e.g. the FilterRowHeaderComposite in case filtering is included. Can benullto avoid rendering of hidden column indicators.rowHeaderLayer- The layer in the row header that should be used to determine the width of the hidden row indicator. Should be the top most layer in the row header region. Can benullto avoid rendering of hidden row indicators.
-
-
Method Details
-
paintOverlay
- Specified by:
paintOverlayin interfaceIOverlayPainter
-
paintOverlay
public void paintOverlay(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Description copied from interface:IOverlayPainter2Render an overlay over the painted layers.- Specified by:
paintOverlayin interfaceIOverlayPainter2- Parameters:
layer- The layer as base for the overlay rendering.gc- The GC.xOffset- The x offset.yOffset- The y offset.rectangle- The print bounds for the rendering action.
-
paintHiddenColumnIndicator
protected void paintHiddenColumnIndicator(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Renders the indicator for hidden columns. By default it renders only if a layer is provided as column header layer.- Parameters:
layer- The layer as base for the overlay rendering.gc- The GC.xOffset- The x offset.yOffset- The y offset.rectangle- The print bounds for the rendering action.
-
paintHiddenRowIndicator
protected void paintHiddenRowIndicator(ILayer layer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle) Renders the indicator for hidden rows. By default it renders only if a layer is provided as row header layer.- Parameters:
layer- The layer as base for the overlay rendering.gc- The GC.xOffset- The x offset.yOffset- The y offset.rectangle- The print bounds for the rendering action.
-
getIndicatorColor
public org.eclipse.swt.graphics.Color getIndicatorColor()Checks if aIConfigRegistryis set to this HideIndicatorOverlayPainter and will try to extract the configuration value forHideIndicatorConfigAttributes.HIDE_INDICATOR_COLOR. If there is no IConfigRegistry set or there is no value for the attribute in the set IConfigRegistry, the Color set as member will be used.- Returns:
- The Color that will be used to render the hide indicator.
-
setIndicatorColor
public void setIndicatorColor(org.eclipse.swt.graphics.Color indicatorColor) - Parameters:
indicatorColor- The Color that should be used to render the hide indicator.nullvalues will be ignored.
-
getIndicatorLineWidth
public int getIndicatorLineWidth()Checks if aIConfigRegistryis set to this HideIndicatorOverlayPainter and will try to extract the configuration value forHideIndicatorConfigAttributes.HIDE_INDICATOR_LINE_WIDTH. If there is no IConfigRegistry set or there is no value for the attribute in the set IConfigRegistry, the line width set as member will be used.- Returns:
- The line width that will be used to render the hide indicator.
-
setIndicatorLineWidth
public void setIndicatorLineWidth(int lineWidth) - Parameters:
lineWidth- The line width that should be used to render the hide indicator.
-
setConfigRegistry
Sets theIConfigRegistryto this HideIndicatorOverlayPainter. By setting it the values for indicator color and indicator width will be read out of theIConfigRegistryand not used from the local member variables.- Parameters:
configRegistry- TheIConfigRegistrythat contains the configuration values for the hide indicator.- See Also:
-
setLayerOnTop
- Parameters:
layer- Layer that is placed above the column header in a composition, e.g. the GroupByHeaderLayer. Needed to adjust the hide indicator start and height, and also to retrieve the labels from a body cell.- Since:
- 2.0
-
setLayerToLeft
- Parameters:
layer- Layer that is placed left of the row header in a composition. Needed to adjust the hide indicator start and height, and also to retrieve the labels from a body cell.- Since:
- 2.0
-