Class TopShadowOverlayPainter
java.lang.Object
org.pushingpixels.radiance.theming.api.painter.overlay.TopShadowOverlayPainter
- All Implemented Interfaces:
RadianceOverlayPainter, RadianceTrait
Overlay painter that paints a few pixel-high drop shadow at the top edge of
the relevant decoration area. This class is part of officially supported API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Map<Integer, TopShadowOverlayPainter> private static final intprivate int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate 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 ofthistrait.static TopShadowOverlayPaintergetInstance(int strength) Returns an instance of top shadow overlay painter with the requested strength.voidpaintOverlay(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, int width, int height, RadianceSkin skin) Paints the overlay.
-
Field Details
-
MAP
-
DEFAULT_SHADOW_START_ALPHA
private static final int DEFAULT_SHADOW_START_ALPHA- See Also:
-
MIN_SHADOW_START_ALPHA
private static final int MIN_SHADOW_START_ALPHA- See Also:
-
startAlpha
private int startAlpha
-
-
Constructor Details
-
TopShadowOverlayPainter
private TopShadowOverlayPainter()Private constructor to enforce thatgetInstance(int)is the only way an application can get an instance of this class.
-
-
Method Details
-
getInstance
Returns an instance of top shadow overlay painter with the requested strength.- Parameters:
strength- Drop shadow strength. Must be in [0..100] range.- Returns:
- Top 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:RadianceOverlayPainterPaints the overlay.- Specified by:
paintOverlayin 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:RadianceTraitReturns the display name ofthistrait. This method is part of officially supported API.- Specified by:
getDisplayNamein interfaceRadianceTrait- Returns:
- The display name of
thistrait.
-