Class MatteDecorationPainter
java.lang.Object
org.pushingpixels.radiance.theming.api.painter.decoration.MatteDecorationPainter
- All Implemented Interfaces:
RadianceDecorationPainter, RadianceTrait
Implementation of
RadianceDecorationPainter that uses matte painting
on decoration areas.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe display name for the decoration painters of this class.private static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidfill(Graphics2D graphics, ContainerColorTokens colorTokens, int offsetY, int x, int y, int width, int height) Returns the display name ofthistrait.voidpaintDecorationArea(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, int width, int height, RadianceSkin skin) Paints the decoration area as a fully filled rectangle.voidpaintDecorationArea(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, Shape outline, ContainerColorTokens colorTokens) Paints the decoration area as a specified shape.private voidpaintExtraBackground(Graphics2D graphics, Component comp, int width, int height, ContainerColorTokens colorTokens) private voidpaintTitleBackground(Graphics2D graphics, int width, int height, ContainerColorTokens colorTokens)
-
Field Details
-
DISPLAY_NAME
The display name for the decoration painters of this class.- See Also:
-
FLEX_POINT
private static final int FLEX_POINT- See Also:
-
-
Constructor Details
-
MatteDecorationPainter
public MatteDecorationPainter()
-
-
Method Details
-
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.
-
paintDecorationArea
public void paintDecorationArea(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, int width, int height, RadianceSkin skin) Description copied from interface:RadianceDecorationPainterPaints the decoration area as a fully filled rectangle.- Specified by:
paintDecorationAreain interfaceRadianceDecorationPainter- Parameters:
graphics- Graphics context.comp- Component.decorationAreaType- Decoration area type. Must not benull.width- Width.height- Height.skin- Skin for painting the decoration area.
-
paintTitleBackground
private void paintTitleBackground(Graphics2D graphics, int width, int height, ContainerColorTokens colorTokens) -
paintExtraBackground
private void paintExtraBackground(Graphics2D graphics, Component comp, int width, int height, ContainerColorTokens colorTokens) -
fill
private void fill(Graphics2D graphics, ContainerColorTokens colorTokens, int offsetY, int x, int y, int width, int height) -
paintDecorationArea
public void paintDecorationArea(Graphics2D graphics, Component comp, RadianceThemingSlices.DecorationAreaType decorationAreaType, Shape outline, ContainerColorTokens colorTokens) Description copied from interface:RadianceDecorationPainterPaints the decoration area as a specified shape.- Specified by:
paintDecorationAreain interfaceRadianceDecorationPainter- Parameters:
graphics- Graphics context.comp- Component.decorationAreaType- Decoration area type. Must not benull.outline- Outline to paint.colorTokens- Color tokens for painting the outline.
-