SubstanceBorderPainter
, SubstanceTrait
public class FractionBasedBorderPainter extends FractionBasedPainter implements SubstanceBorderPainter
colorQueries, fractions
Constructor | Description |
---|---|
FractionBasedBorderPainter(java.lang.String displayName,
float[] fractions,
ColorSchemeSingleColorQuery[] colorQueries) |
Creates a new fraction-based border painter.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
isPaintingInnerContour() |
Returns boolean indication whether this border painter is painting the
inner contours.
|
void |
paintBorder(java.awt.Graphics g,
java.awt.Component c,
int width,
int height,
java.awt.Shape contour,
java.awt.Shape innerContour,
SubstanceColorScheme borderScheme) |
Paints the control border.
|
getColorQueries, getDisplayName, getFractions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName
public FractionBasedBorderPainter(java.lang.String displayName, float[] fractions, ColorSchemeSingleColorQuery[] colorQueries)
displayName
- The display name of this painter.fractions
- The fractions of this painter. Must be strictly increasing,
starting from 0.0 and ending at 1.0.colorQueries
- The color queries of this painter. Must have the same size as
the fractions array, and all entries must be non-
null
.public void paintBorder(java.awt.Graphics g, java.awt.Component c, int width, int height, java.awt.Shape contour, java.awt.Shape innerContour, SubstanceColorScheme borderScheme)
SubstanceBorderPainter
paintBorder
in interface SubstanceBorderPainter
g
- Graphics.c
- Component.width
- Width of a UI component.height
- Height of a UI component.contour
- Contour of a UI component.innerContour
- Inner contour of a UI component. May be ignored if the
specific implementation paints only the outside border.borderScheme
- The border color scheme.public boolean isPaintingInnerContour()
SubstanceBorderPainter
isPaintingInnerContour
in interface SubstanceBorderPainter
true
if this border painter is painting the inner
contours, false
otherwise.