|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.api.painter.FractionBasedPainter
public abstract class FractionBasedPainter
Base painter with fraction-based stops and a color query associated with each stop. This class allows creating multi-stop gradients with exact control over which color is used at every gradient control point.
| Field Summary | |
|---|---|
protected ColorSchemeSingleColorQuery[] |
colorQueries
The color queries of this painter. |
protected float[] |
fractions
The fractions of this painter. |
| Constructor Summary | |
|---|---|
FractionBasedPainter(java.lang.String displayName,
float[] fractions,
ColorSchemeSingleColorQuery[] colorQueries)
Creates a new fraction-based border painter. |
|
| Method Summary | |
|---|---|
ColorSchemeSingleColorQuery[] |
getColorQueries()
Returns the color queries of this painter. |
java.lang.String |
getDisplayName()
Returns the display name of this trait. |
float[] |
getFractions()
Returns the fractions of this painter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float[] fractions
IllegalArgumentException, the entries in this array are strictly
increasing, starting from 0.0 and ending at 1.0.
protected ColorSchemeSingleColorQuery[] colorQueries
fractions, specifying which color
will be used at the relevant gradient control point. If the constructor
has not thrown an IllegalArgumentException, the size of this
array is identical to the size of fractions, and there are no
null entries in this array. Note that the application code
can still cause an exception at runtime by throwing it in the
implementation of the
ColorSchemeSingleColorQuery.query(SubstanceColorScheme) method.
| Constructor Detail |
|---|
public FractionBasedPainter(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.| Method Detail |
|---|
public java.lang.String getDisplayName()
SubstanceTraitthis trait. This method is part
of officially supported API.
getDisplayName in interface SubstanceTraitthis trait.public float[] getFractions()
public ColorSchemeSingleColorQuery[] getColorQueries()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||