Class HideIndicatorOverlayPainter

    • Field Detail

      • columnHeaderLayer

        protected ILayer columnHeaderLayer
      • rowHeaderLayer

        protected ILayer rowHeaderLayer
      • configRegistry

        protected IConfigRegistry configRegistry
        The IConfigRegistry that should be used to retrieve the color to use for rendering the hide indicator. If set to null, the locally set color will be used.
    • Constructor Detail

      • HideIndicatorOverlayPainter

        public HideIndicatorOverlayPainter​(ILayer columnHeaderLayer,
                                           ILayer rowHeaderLayer)
        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 be null to 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 be null to avoid rendering of hidden row indicators.
    • Method Detail

      • 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: IOverlayPainter2
        Render an overlay over the painted layers.
        Specified by:
        paintOverlay in interface IOverlayPainter2
        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 a IConfigRegistry is set to this HideIndicatorOverlayPainter and will try to extract the configuration value for HideIndicatorConfigAttributes.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. null values will be ignored.
      • getIndicatorLineWidth

        public int getIndicatorLineWidth()
        Checks if a IConfigRegistry is set to this HideIndicatorOverlayPainter and will try to extract the configuration value for HideIndicatorConfigAttributes.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.
      • setLayerOnTop

        public void setLayerOnTop​(ILayer layer)
        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

        public void setLayerToLeft​(ILayer layer)
        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