Class SpecularRectangularFillPainter
java.lang.Object
org.pushingpixels.radiance.theming.api.painter.fill.SpecularRectangularFillPainter
- All Implemented Interfaces:
RadianceFillPainter
,RadianceTrait
Fill painter that draws visuals with subtle 3D gradient appearance. This class is part of
officially supported API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
private final class
This class is based on Romain Guy's work from http://www.jroller.com/gfx/entry/new_blendings_modes_for_java2d available under BSD license. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpecularRectangularFillPainter
(RadianceFillPainter baseFillPainter, float alpha) -
Method Summary
Modifier and TypeMethodDescriptionReturns the display name ofthis
trait.getRepresentativeColor
(RadianceColorScheme fillScheme) private BufferedImage
getShineImage
(Component comp, Shape contour, Color topShineColor, Color bottomShineColor, float alpha, int shineWidth, int shineHeight) void
paintContourBackground
(Graphics g, Component comp, float width, float height, Shape contour, RadianceColorScheme fillScheme) Fills the contour that matches the specified parameters.private double
spline
(double startY, double control1Y, double control2Y, double endY, double t)
-
Field Details
-
SCALE
private static int SCALE -
baseFillPainter
-
alpha
private float alpha
-
-
Constructor Details
-
SpecularRectangularFillPainter
-
-
Method Details
-
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.
-
getRepresentativeColor
- Specified by:
getRepresentativeColor
in interfaceRadianceFillPainter
-
spline
private double spline(double startY, double control1Y, double control2Y, double endY, double t) -
paintContourBackground
public void paintContourBackground(Graphics g, Component comp, float width, float height, Shape contour, RadianceColorScheme fillScheme) Description copied from interface:RadianceFillPainter
Fills the contour that matches the specified parameters.- Specified by:
paintContourBackground
in interfaceRadianceFillPainter
- Parameters:
g
- Graphics context.comp
- Component to paint.width
- Width of a UI component.height
- Height of a UI component.contour
- Contour of a UI component.fillScheme
- The fill color scheme.
-
getShineImage
private BufferedImage getShineImage(Component comp, Shape contour, Color topShineColor, Color bottomShineColor, float alpha, int shineWidth, int shineHeight)
-