Package ch.swingfx.twinkle.style.overlay
Class AbstractOverlay
java.lang.Object
ch.swingfx.twinkle.style.overlay.AbstractOverlay
- All Implemented Interfaces:
IOverlay
- Direct Known Subclasses:
BorderOverlay
,GradientOverlay
Extend this class if you want to create your own
It implements the logic for
IOverlay
implementations.It implements the logic for
OverlayPaintMode
values.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
paintMouseOut
(Graphics g, int cornerRadius) Called by paintOverlayMouseOut if we should paint it.abstract void
paintMouseOver
(Graphics g, int cornerRadius) Called by paintOverlayMouseOver if we should paint it.void
paintOverlayMouseOut
(Graphics g, int cornerRadius) Invoked when we should paint the overlay when the mouse is outvoid
paintOverlayMouseOver
(Graphics g, int cornerRadius) Invoked when we should paint the overlay when the mouse is overvoid
setOverlayPaintMode
(OverlayPaintMode paintMode) Set when the overlay is painted
-
Field Details
-
fDecorator
-
fPaintMode
-
-
Constructor Details
-
AbstractOverlay
-
-
Method Details
-
paintOverlayMouseOver
Description copied from interface:IOverlay
Invoked when we should paint the overlay when the mouse is over- Specified by:
paintOverlayMouseOver
in interfaceIOverlay
- Parameters:
g
-Graphics
to paint oncornerRadius
- the corner radius of the window
-
paintOverlayMouseOut
Description copied from interface:IOverlay
Invoked when we should paint the overlay when the mouse is out- Specified by:
paintOverlayMouseOut
in interfaceIOverlay
- Parameters:
g
-Graphics
to paint oncornerRadius
- the corner radius of the window
-
setOverlayPaintMode
Description copied from interface:IOverlay
Set when the overlay is painted- Specified by:
setOverlayPaintMode
in interfaceIOverlay
- Parameters:
paintMode
- paint mode to apply
-
paintMouseOver
Called by paintOverlayMouseOver if we should paint it.- Parameters:
g
- graphics to paint oncornerRadius
- corner radius of the window
-
paintMouseOut
Called by paintOverlayMouseOut if we should paint it.- Parameters:
g
- graphics to paint oncornerRadius
- corner radius of the window
-