Class CopySelectionLayerPainter

    • Constructor Detail

      • CopySelectionLayerPainter

        public CopySelectionLayerPainter​(InternalCellClipboard clipboard,
                                         org.eclipse.swt.graphics.Color gridColor)
        Create a CopySelectionLayerPainter that renders gray grid lines and uses the default clipping behavior.
        Parameters:
        clipboard - The InternalCellClipboard that stores the cells that are currently copied.
        gridColor - The color that should be used to render the grid lines.
      • CopySelectionLayerPainter

        public CopySelectionLayerPainter​(InternalCellClipboard clipboard,
                                         org.eclipse.swt.graphics.Color gridColor,
                                         boolean clipLeft,
                                         boolean clipTop)
        Create a CopySelectionLayerPainter that renders grid lines in the specified color and uses the specified clipping behavior.
        Parameters:
        clipboard - The InternalCellClipboard that stores the cells that are currently copied.
        gridColor - The color that should be used to render the grid lines.
        clipLeft - Configure the rendering behavior when cells overlap. If set to true the left cell will be clipped, if set to false the right cell will be clipped. The default value is false.
        clipTop - Configure the rendering behavior when cells overlap. If set to true the top cell will be clipped, if set to false the bottom cell will be clipped. The default value is false.
      • CopySelectionLayerPainter

        public CopySelectionLayerPainter​(InternalCellClipboard clipboard,
                                         boolean clipLeft,
                                         boolean clipTop)
        Create a CopySelectionLayerPainter that renders gray grid lines and uses the specified clipping behavior.
        Parameters:
        clipboard - The InternalCellClipboard that stores the cells that are currently copied.
        clipLeft - Configure the rendering behavior when cells overlap. If set to true the left cell will be clipped, if set to false the right cell will be clipped. The default value is false.
        clipTop - Configure the rendering behavior when cells overlap. If set to true the top cell will be clipped, if set to false the bottom cell will be clipped. The default value is false.
    • Method Detail

      • paintLayer

        public void paintLayer​(ILayer natLayer,
                               org.eclipse.swt.graphics.GC gc,
                               int xOffset,
                               int yOffset,
                               org.eclipse.swt.graphics.Rectangle pixelRectangle,
                               IConfigRegistry configRegistry)
        Specified by:
        paintLayer in interface ILayerPainter
        Overrides:
        paintLayer in class SelectionLayerPainter
        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
        pixelRectangle - area the layer can paint in
        configRegistry - IConfigRegistry in use by NatTable. Useful for looking up associated painters.