Class StandardFillPainter
java.lang.Object
org.pushingpixels.substance.api.painter.fill.StandardFillPainter
- All Implemented Interfaces:
SubstanceFillPainter
,SubstanceTrait
- Direct Known Subclasses:
ClassicFillPainter
,GlassFillPainter
,SimplisticFillPainter
,SubduedFillPainter
Gradient painter that returns images with subtle 3D gradient appearance. This
class is part of officially supported API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBottomFillColor
(SubstanceColorScheme fillScheme) Computes the color of the bottom portion of the fill.getBottomShineColor
(SubstanceColorScheme fillScheme) Computes the color of the bottom portion of the shine.Returns the display name ofthis
trait.getMidFillColorBottom
(SubstanceColorScheme fillScheme) Computes the color of the middle portion of the fill from the bottom.getMidFillColorTop
(SubstanceColorScheme fillScheme) Computes the color of the middle portion of the fill from the top.getTopFillColor
(SubstanceColorScheme fillScheme) Computes the color of the top portion of the fill.getTopShineColor
(SubstanceColorScheme fillScheme) Computes the color of the top portion of the shine.void
paintContourBackground
(Graphics g, Component comp, int width, int height, Shape contour, boolean isFocused, SubstanceColorScheme fillScheme, boolean hasShine) Fills the contour that matches the specified parameters.
-
Constructor Details
-
StandardFillPainter
public StandardFillPainter()
-
-
Method Details
-
getDisplayName
Description copied from interface:SubstanceTrait
Returns the display name ofthis
trait. This method is part of officially supported API.- Specified by:
getDisplayName
in interfaceSubstanceTrait
- Returns:
- The display name of
this
trait.
-
paintContourBackground
public void paintContourBackground(Graphics g, Component comp, int width, int height, Shape contour, boolean isFocused, SubstanceColorScheme fillScheme, boolean hasShine) Description copied from interface:SubstanceFillPainter
Fills the contour that matches the specified parameters.- Specified by:
paintContourBackground
in interfaceSubstanceFillPainter
- 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.isFocused
- Indication whether component owns the focus.fillScheme
- The fill color scheme.hasShine
- Indication whether the returned image should have a 3D shine spot in its top half.
-
getTopFillColor
Computes the color of the top portion of the fill. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the top portion of the fill.
-
getMidFillColorTop
Computes the color of the middle portion of the fill from the top. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the middle portion of the fill from the top.
-
getMidFillColorBottom
Computes the color of the middle portion of the fill from the bottom. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the middle portion of the fill from the bottom.
-
getBottomFillColor
Computes the color of the bottom portion of the fill. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the bottom portion of the fill.
-
getTopShineColor
Computes the color of the top portion of the shine. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the top portion of the shine.
-
getBottomShineColor
Computes the color of the bottom portion of the shine. Override to provide different visual.- Parameters:
fillScheme
- The fill scheme.- Returns:
- The color of the bottom portion of the shine.
-