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(com.google.gwt.core.client.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
DrawPane.gradients . |
static Gradient |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getStartColor()
A start color for the gradient.
|
Gradient |
setColorStops(ColorStop... colorStops)
An array of color stops for this gradient.
|
Gradient |
setEndColor(java.lang.String endColor)
An end color for the gradient.
|
Gradient |
setId(java.lang.String id)
Identifier which can be used by one or more DrawItems when gradient is assigned to
DrawPane.gradients . |
Gradient |
setStartColor(java.lang.String startColor)
A start color for the gradient.
|
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, 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(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Gradient getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public Gradient setColorStops(ColorStop... colorStops)
colorStops
- New colorStops value. Default value is nullGradient
instance, for chaining setter callspublic ColorStop[] getColorStops()
public Gradient setEndColor(java.lang.String endColor)
startColor
and
endColor are set then colorStops
is ignored.public java.lang.String getEndColor()
startColor
and
endColor are set then colorStops
is ignored.CSSColor
public Gradient setId(java.lang.String id)
DrawPane.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
- New id value. Default value is nullGradient
instance, for chaining setter callsIdentifier
public java.lang.String getId()
DrawPane.gradients
. The ID property is optional when gradient
is assigned directly to a DrawItem. The ID must be unique within DrawPane.gradients if defined.
Identifier
public Gradient setStartColor(java.lang.String startColor)
endColor
are set then colorStops
is ignored.public java.lang.String getStartColor()
endColor
are set then colorStops
is ignored.CSSColor