Class StandardFillPainter
- java.lang.Object
-
- org.pushingpixels.substance.api.painter.fill.StandardFillPainter
-
- All Implemented Interfaces:
SubstanceFillPainter,SubstanceTrait
- Direct Known Subclasses:
ClassicFillPainter,GlassFillPainter,SubduedFillPainter
public class StandardFillPainter extends java.lang.Object implements SubstanceFillPainter
Fill painter that returns images with subtle 3D gradient appearance. This class is part of officially supported API.
-
-
Constructor Summary
Constructors Constructor Description StandardFillPainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetBottomFillColor(SubstanceColorScheme fillScheme)Computes the color of the bottom portion of the fill.java.awt.ColorgetBottomShineColor(SubstanceColorScheme fillScheme)Computes the color of the bottom portion of the shine.java.lang.StringgetDisplayName()Returns the display name ofthistrait.java.awt.ColorgetMidFillColorBottom(SubstanceColorScheme fillScheme)Computes the color of the middle portion of the fill from the bottom.java.awt.ColorgetMidFillColorTop(SubstanceColorScheme fillScheme)Computes the color of the middle portion of the fill from the top.java.awt.ColorgetTopFillColor(SubstanceColorScheme fillScheme)Computes the color of the top portion of the fill.java.awt.ColorgetTopShineColor(SubstanceColorScheme fillScheme)Computes the color of the top portion of the shine.voidpaintContourBackground(java.awt.Graphics g, java.awt.Component comp, float width, float height, java.awt.Shape contour, boolean isFocused, SubstanceColorScheme fillScheme, boolean hasShine)Fills the contour that matches the specified parameters.
-
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:SubstanceTraitReturns the display name ofthistrait. This method is part of officially supported API.- Specified by:
getDisplayNamein interfaceSubstanceTrait- Returns:
- The display name of
thistrait.
-
paintContourBackground
public void paintContourBackground(java.awt.Graphics g, java.awt.Component comp, float width, float height, java.awt.Shape contour, boolean isFocused, SubstanceColorScheme fillScheme, boolean hasShine)Description copied from interface:SubstanceFillPainterFills the contour that matches the specified parameters.- Specified by:
paintContourBackgroundin 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
public java.awt.Color getTopFillColor(SubstanceColorScheme fillScheme)
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
public java.awt.Color getMidFillColorTop(SubstanceColorScheme fillScheme)
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
public java.awt.Color getMidFillColorBottom(SubstanceColorScheme fillScheme)
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
public java.awt.Color getBottomFillColor(SubstanceColorScheme fillScheme)
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
public java.awt.Color getTopShineColor(SubstanceColorScheme fillScheme)
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
public java.awt.Color getBottomShineColor(SubstanceColorScheme fillScheme)
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.
-
-