Class BottomShadowOverlayPainter
java.lang.Object
org.pushingpixels.radiance.theming.api.painter.overlay.BottomShadowOverlayPainter
- All Implemented Interfaces:
RadianceOverlayPainter
,RadianceTrait
Overlay painter that paints a few pixel-high drop shadow at the bottom edge
of the relevant decoration area. This class is part of officially supported
API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private int
private static final Map
<Integer, BottomShadowOverlayPainter> private static final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Private constructor to enforce thatgetInstance(int)
is the only way an application can get an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the display name ofthis
trait.static BottomShadowOverlayPainter
Returns the single instance of this class.static BottomShadowOverlayPainter
getInstance
(int strength) Returns an instance of bottom shadow overlay painter with the requested strength.void
paintOverlay
(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, int width, int height, RadianceSkin skin) Paints the overlay.
-
Field Details
-
MAP
-
DEFAULT_SHADOW_END_ALPHA
private static final int DEFAULT_SHADOW_END_ALPHA- See Also:
-
MIN_SHADOW_END_ALPHA
private static final int MIN_SHADOW_END_ALPHA- See Also:
-
endAlpha
private int endAlpha
-
-
Constructor Details
-
BottomShadowOverlayPainter
private BottomShadowOverlayPainter()Private constructor to enforce thatgetInstance(int)
is the only way an application can get an instance of this class.
-
-
Method Details
-
getInstance
Returns the single instance of this class.- Returns:
- Single instance of this class.
-
getInstance
Returns an instance of bottom shadow overlay painter with the requested strength.- Parameters:
strength
- Drop shadow strength. Must be in [0..100] range.- Returns:
- Bottom shadow overlay painter with the requested strength.
-
paintOverlay
public void paintOverlay(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, int width, int height, RadianceSkin skin) Description copied from interface:RadianceOverlayPainter
Paints the overlay.- Specified by:
paintOverlay
in interfaceRadianceOverlayPainter
- Parameters:
graphics
- Graphics context.comp
- Component.decorationAreaType
- Decoration area type. Must not benull
.width
- Width.height
- Height.skin
- Skin for painting the overlay.
-
getDisplayName
Description copied from interface:RadianceTrait
Returns the display name ofthis
trait. This method is part of officially supported API.- Specified by:
getDisplayName
in interfaceRadianceTrait
- Returns:
- The display name of
this
trait.
-