SubstanceDecorationPainter, SubstanceTraitpublic class FractionBasedDecorationPainter extends FractionBasedPainter implements SubstanceDecorationPainter
colorQueries, fractions| Constructor | Description |
|---|---|
FractionBasedDecorationPainter(java.lang.String displayName,
float[] fractions,
ColorSchemeSingleColorQuery[] colorQueries) |
Creates a new fraction-based decoration painter.
|
FractionBasedDecorationPainter(java.lang.String displayName,
float[] fractions,
ColorSchemeSingleColorQuery[] colorQueries,
SubstanceSlices.DecorationAreaType... decorationAreas) |
Creates a new fraction-based decoration painter.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
paintDecorationArea(java.awt.Graphics2D graphics,
java.awt.Component comp,
SubstanceSlices.DecorationAreaType decorationAreaType,
int width,
int height,
SubstanceSkin skin) |
Paints the decoration area as a fully filled rectangle.
|
void |
paintDecorationArea(java.awt.Graphics2D graphics,
java.awt.Component comp,
SubstanceSlices.DecorationAreaType decorationAreaType,
java.awt.Shape contour,
SubstanceColorScheme colorScheme) |
Paints the decoration area as a specified shape.
|
getColorQueries, getDisplayName, getFractionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayNamepublic FractionBasedDecorationPainter(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 FractionBasedDecorationPainter(java.lang.String displayName,
float[] fractions,
ColorSchemeSingleColorQuery[] colorQueries,
SubstanceSlices.DecorationAreaType... decorationAreas)
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.decorationAreas - Decoration areas that should be painted based on the color
queries. All the rest will be filled with a solid color from
the background color scheme of the matching decoration area.public void paintDecorationArea(java.awt.Graphics2D graphics,
java.awt.Component comp,
SubstanceSlices.DecorationAreaType decorationAreaType,
int width,
int height,
SubstanceSkin skin)
SubstanceDecorationPainterpaintDecorationArea in interface SubstanceDecorationPaintergraphics - Graphics context.comp - Component.decorationAreaType - Decoration area type. Must not be null.width - Width.height - Height.skin - Skin for painting the decoration area.public void paintDecorationArea(java.awt.Graphics2D graphics,
java.awt.Component comp,
SubstanceSlices.DecorationAreaType decorationAreaType,
java.awt.Shape contour,
SubstanceColorScheme colorScheme)
SubstanceDecorationPainterpaintDecorationArea in interface SubstanceDecorationPaintergraphics - Graphics context.comp - Component.decorationAreaType - Decoration area type. Must not be null.contour - Contour to fill.colorScheme - Color scheme for painting the decoration area.