Class AbstractOverlay

java.lang.Object
ch.swingfx.twinkle.style.overlay.AbstractOverlay
All Implemented Interfaces:
IOverlay
Direct Known Subclasses:
BorderOverlay, GradientOverlay

public abstract class AbstractOverlay extends Object implements IOverlay
Extend this class if you want to create your own IOverlay implementations.
It implements the logic for OverlayPaintMode values.
  • Field Details

  • Constructor Details

  • Method Details

    • paintOverlayMouseOver

      public void paintOverlayMouseOver(Graphics g, int cornerRadius)
      Description copied from interface: IOverlay
      Invoked when we should paint the overlay when the mouse is over
      Specified by:
      paintOverlayMouseOver in interface IOverlay
      Parameters:
      g - Graphics to paint on
      cornerRadius - the corner radius of the window
    • paintOverlayMouseOut

      public void paintOverlayMouseOut(Graphics g, int cornerRadius)
      Description copied from interface: IOverlay
      Invoked when we should paint the overlay when the mouse is out
      Specified by:
      paintOverlayMouseOut in interface IOverlay
      Parameters:
      g - Graphics to paint on
      cornerRadius - the corner radius of the window
    • setOverlayPaintMode

      public void setOverlayPaintMode(OverlayPaintMode paintMode)
      Description copied from interface: IOverlay
      Set when the overlay is painted
      Specified by:
      setOverlayPaintMode in interface IOverlay
      Parameters:
      paintMode - paint mode to apply
    • paintMouseOver

      public abstract void paintMouseOver(Graphics g, int cornerRadius)
      Called by paintOverlayMouseOver if we should paint it.
      Parameters:
      g - graphics to paint on
      cornerRadius - corner radius of the window
    • paintMouseOut

      public abstract void paintMouseOut(Graphics g, int cornerRadius)
      Called by paintOverlayMouseOut if we should paint it.
      Parameters:
      g - graphics to paint on
      cornerRadius - corner radius of the window