Class FillHandleCompositeFreezeLayerPainter

All Implemented Interfaces:
FillHandleBoundsProvider, ILayerPainter

public class FillHandleCompositeFreezeLayerPainter extends CompositeFreezeLayerPainter implements FillHandleBoundsProvider
Specialization of the CompositeFreezeLayerPainter that retrieves the fill handle bounds from the separate paint calls and stores them locally.
Since:
2.5
  • Field Details

    • handleBounds

      protected org.eclipse.swt.graphics.Rectangle handleBounds
      The bounds of the current visible selection handle or null if no fill handle is currently rendered.
  • Constructor Details

  • Method Details

    • paintLayer

      public void paintLayer(ILayer natLayer, org.eclipse.swt.graphics.GC gc, int xOffset, int yOffset, org.eclipse.swt.graphics.Rectangle rectangle, IConfigRegistry configRegistry)
      Specified by:
      paintLayer in interface ILayerPainter
      Overrides:
      paintLayer in class CompositeFreezeLayerPainter
      Parameters:
      natLayer - The layer to paint.
      gc - GC used for painting
      xOffset - x offset of the layer from the origin of the table
      yOffset - y offset of the layer from the origin of the table
      rectangle - area the layer can paint in
      configRegistry - IConfigRegistry in use by NatTable. Useful for looking up associated painters.
    • processLayerPainterInformation

      protected void processLayerPainterInformation(ILayerPainter painter)
      Description copied from class: CompositeLayer.CompositeLayerPainter
      Process the information stored in a ILayerPainter of a composite region. Needed to avoid that the information is lost if the same painter is used in all regions, e.g. the FillHandleLayerPainter.
      Overrides:
      processLayerPainterInformation in class CompositeLayer.CompositeLayerPainter
      Parameters:
      painter - The ILayerPainter of a composite region.
    • paintFillHandle

      protected void paintFillHandle(org.eclipse.swt.graphics.GC gc, IConfigRegistry configRegistry)
      Paint the fill handle.
      Parameters:
      gc - The GC used for painting.
      configRegistry - The IConfigRegistry to retrieve fill handle configurations.
    • getHandleColor

      protected org.eclipse.swt.graphics.Color getHandleColor(IConfigRegistry configRegistry)
      Returns the color that should be used to render the fill handle. If the IConfigRegistry is null or does not contain configurations for the color of the fill handle, a default dark green color is used.
      Parameters:
      configRegistry - The IConfigRegistry needed to determine the configured fill handle color. Can be null which results in returning a default dark green color.
      Returns:
      the color that should be used
    • getHandleBorderStyle

      protected BorderStyle getHandleBorderStyle(IConfigRegistry configRegistry)
      Returns the border style that should be used to render the border of the fill handle. If the IConfigRegistry is null or does not contain configurations for styling the border of the fill handle, a default style is used.
      Parameters:
      configRegistry - The IConfigRegistry needed to determine the configured fill handle border style. Can be null which results in returning a default style.
      Returns:
      the border style that should be used
    • getSelectionHandleBounds

      public org.eclipse.swt.graphics.Rectangle getSelectionHandleBounds()
      Specified by:
      getSelectionHandleBounds in interface FillHandleBoundsProvider
      Returns:
      The bounds of the current visible selection handle or null if no fill handle is currently rendered.