Class GradientOverlay

  • All Implemented Interfaces:
    IOverlay

    public class GradientOverlay
    extends AbstractOverlay
    Paints a simple gradient from top to bottom
    • Field Detail

      • fStartColor

        private final java.awt.Color fStartColor
      • fEndColor

        private final java.awt.Color fEndColor
    • Constructor Detail

      • GradientOverlay

        public GradientOverlay​(java.awt.Color startColor,
                               java.awt.Color endColor,
                               OverlayPaintMode paintMode)
        Create a gradient overlay
        Parameters:
        startColor - top color
        endColor - bottom color
        paintMode - paint mode of the overlay
      • GradientOverlay

        public GradientOverlay​(java.awt.Color startColor,
                               java.awt.Color endColor,
                               OverlayPaintMode paintMode,
                               IOverlay decorator)
        Create a gradient overlay with a decorator
        Parameters:
        startColor - top color
        endColor - bottom color
        paintMode - paint mode of the overlay
        decorator - Overlay we want to decorate
    • Method Detail

      • paintGradient

        private void paintGradient​(java.awt.Graphics g,
                                   int cornerRadius)
      • paintMouseOver

        public void paintMouseOver​(java.awt.Graphics g,
                                   int cornerRadius)
        Description copied from class: AbstractOverlay
        Called by paintOverlayMouseOver if we should paint it.
        Specified by:
        paintMouseOver in class AbstractOverlay
        Parameters:
        g - graphics to paint on
        cornerRadius - corner radius of the window
      • paintMouseOut

        public void paintMouseOut​(java.awt.Graphics g,
                                  int cornerRadius)
        Description copied from class: AbstractOverlay
        Called by paintOverlayMouseOut if we should paint it.
        Specified by:
        paintMouseOut in class AbstractOverlay
        Parameters:
        g - graphics to paint on
        cornerRadius - corner radius of the window