Class BorderOverlay

  • All Implemented Interfaces:
    IOverlay

    public class BorderOverlay
    extends AbstractOverlay
    Paints a border around the notification
    • Field Detail

      • fImage

        private java.awt.image.BufferedImage fImage
      • fColor

        private final java.awt.Color fColor
      • fWidth

        private final int fWidth
    • Constructor Detail

      • BorderOverlay

        public BorderOverlay​(int width,
                             java.awt.Color color,
                             OverlayPaintMode paintMode)
        Create a new BorderOverlay
        Parameters:
        width - width of the border
        color - color of the border
        paintMode - paint mode of the border
      • BorderOverlay

        public BorderOverlay​(int width,
                             java.awt.Color color,
                             OverlayPaintMode paintMode,
                             IOverlay decorator)
        Create a new BorderOverlay with a decorator
        Parameters:
        width - width of the border
        color - color of the border
        paintMode - paint mode of the border
        decorator - Overlay we want to decorate
    • Method Detail

      • 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
      • createBorderImage

        private void createBorderImage​(java.awt.Graphics g,
                                       int cornerRadius)
        Create the border fImage. Using BasicStroke and draw doesn't produce good looking result. Therefore we create a border fImage that looks good.
        Parameters:
        g - graphics
        cornerRadius - the corner radius of the window
      • paintBorder

        private void paintBorder​(java.awt.Graphics g,
                                 int cornerRadius)