Class BlendedBackgroundPainter

All Implemented Interfaces:

public class BlendedBackgroundPainter extends TextPainter

A cell painter that can blend multiple background colours together when more than one has been registered for a given cell.

For example, if using the alternating row colour style, when multiple rows are selected, with a normal painter, a single selection colour is applied to all the selected cell's backgrounds.

With this painter, the selection background colour blends with the alternating colour rather than just replacing it leaving two alternating selection colours.

Stefan Bolton
  • Constructor Details

    • BlendedBackgroundPainter

      public BlendedBackgroundPainter( gridBackgroundColour)
  • Method Details

    • getBackgroundColour

      protected getBackgroundColour(ILayerCell cell, IConfigRegistry configRegistry)
      getBackgroundColour in class BackgroundPainter
    • blendBackgroundColour

      public static blendBackgroundColour(ILayerCell cell, IConfigRegistry configRegistry, baseColor)
      Returns a background colour for the specified cell. If multiple colours have been registered, they are all blended together.
      cell - the LayerCell to get a background colour for.
      configRegistry - an IConfigRegistry .
      baseColor - Colours are not blended with this colour.
      A blended background colour.