Class CompositeFreezeLayerPainter

    • Method Detail

      • 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 CompositeLayer.CompositeLayerPainter
        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.
      • getHeight

        protected int getHeight()
        Returns the height of the freeze border dependent on the configured layers this painter is attached to.
        Returns:
        The height of the freeze border.
      • getWidth

        protected int getWidth()
        Returns the width of the freeze border dependent on the configured layers this painter is attached to.
        Returns:
        The width of the freeze border.
      • getFreezeX

        protected int getFreezeX​(int xOffset)
        Returns the x coordinate of the freeze border.
        Parameters:
        xOffset - The composition offset.
        Returns:
        The x coordinate value for the horizontal freeze border.
      • getFreezeY

        protected int getFreezeY​(int yOffset)
        Returns the y coordinate of the freeze border.
        Parameters:
        yOffset - The composition offset.
        Returns:
        The y coordinate value for the vertical freeze border.
      • addNestedVerticalLayer

        public void addNestedVerticalLayer​(ILayer layer)
        Adds the given layer to the list of nested vertical layers that are used to shift the freeze border down. Needed in case of nested compositions, e.g. using a fixed summary row in the body region.
        Parameters:
        layer - The ILayer to add.
      • addNestedHorizontalLayer

        public void addNestedHorizontalLayer​(ILayer layer)
        Adds the given layer to the list of nested horizontal layers that are used to shift the freeze border to the right. Needed in case of nested compositions in the body region.
        Parameters:
        layer - The ILayer to add.