Class CompiereColor.ColorBackground

  • Enclosing class:
    CompiereColor

    public class CompiereColor.ColorBackground
    extends Object
    Background contains a Buffered Image with the background. The initial size is determined by the constructor. It is resized if required when painting.
    The Buffered image is a 8-bit RGBA color components packed into integer pixels. The image has a DirectColorModel with alpha. The color data in this image is considered to be premultiplied with alpha
    • Constructor Detail

      • ColorBackground

        public ColorBackground​(Rectangle bounds)
        Create Color Background
        Parameters:
        bounds - Rectangle to fit in
    • Method Detail

      • fillColorBackground

        public void fillColorBackground()
        Fill Background with Color
      • paint

        public void paint​(Graphics g,
                          JComponent c)
        Paint/copy background to component
        Parameters:
        g - graphics
        c - component
      • paintRect

        public void paintRect​(Graphics g,
                              JComponent c,
                              int x,
                              int y,
                              int w,
                              int h)
        Paint/copy background to component rectangle
        Parameters:
        g - graphics
        c - compnent
        x - x pos
        y - y pos
        w - width
        h - height