public class Gradient extends DataClass
two
colors
, or using colorStops
. See SimpleGradient
, LinearGradient
and
RadialGradient
for further properties to define more advanced gradients.factoryCreated, factoryProperties
Constructor and Description |
---|
Gradient() |
Gradient(JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
ColorStop[] |
getColorStops()
An array of color stops for this gradient.
|
java.lang.String |
getEndColor()
An end color for the gradient.
|
java.lang.String |
getId()
Identifier which can be used by one or more DrawItems when gradient is assigned to
gradients . |
static Gradient |
getOrCreateRef(JavaScriptObject jsObj) |
java.lang.String |
getStartColor()
A start color for the gradient.
|
void |
setColorStops(ColorStop... colorStops)
An array of color stops for this gradient.
|
void |
setEndColor(java.lang.String endColor)
An end color for the gradient.
|
void |
setId(java.lang.String id)
Identifier which can be used by one or more DrawItems when gradient is assigned to
gradients . |
void |
setStartColor(java.lang.String startColor)
A start color for the gradient.
|
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
public Gradient()
public Gradient(JavaScriptObject jsObj)
public static Gradient getOrCreateRef(JavaScriptObject jsObj)
public void setColorStops(ColorStop... colorStops)
colorStops
- Default value is nullpublic ColorStop[] getColorStops()
public void setEndColor(java.lang.String endColor)
startColor
and
endColor are set then colorStops
is ignored.endColor
- See CSSColor
. Default value is nullpublic java.lang.String getEndColor()
startColor
and
endColor are set then colorStops
is ignored.CSSColor
public void setId(java.lang.String id)
gradients
. The ID property is optional when gradient is
assigned directly to a DrawItem. The ID must be unique within DrawPane.gradients if defined.
id
- Default value is nullpublic java.lang.String getId()
gradients
. The ID property is optional when gradient is
assigned directly to a DrawItem. The ID must be unique within DrawPane.gradients if defined.
public void setStartColor(java.lang.String startColor)
endColor
are set then colorStops
is ignored.startColor
- See CSSColor
. Default value is nullpublic java.lang.String getStartColor()
endColor
are set then colorStops
is ignored.CSSColor