Class SimpleGradient
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.drawing.Gradient
com.smartgwt.client.widgets.drawing.SimpleGradient
- All Implemented Interfaces:
HasHandlers
Definition of a simple linear gradient defined by 2 colors and a
direction.-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatAngle of the direction vector in degrees.The end color of the gradient.static SimpleGradientgetOrCreateRef(JavaScriptObject jsObj) The start color of the gradient.setDirection(float direction) Angle of the direction vector in degrees.setEndColor(String endColor) The end color of the gradient.setStartColor(String startColor) The start color of the gradient.Methods inherited from class com.smartgwt.client.widgets.drawing.Gradient
getColorStops, getId, setColorStops, setIdMethods inherited from class com.smartgwt.client.core.DataClass
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
-
Constructor Details
-
SimpleGradient
public SimpleGradient() -
SimpleGradient
-
-
Method Details
-
getOrCreateRef
-
setDirection
Angle of the direction vector in degrees. The default of 0.0 causes the gradient to sweep from the start color on the left to the end color on the right. Positive direction angles correspond to clockwise rotations of the default gradient.- Parameters:
direction- New direction value. Default value is 0.0- Returns:
SimpleGradientinstance, for chaining setter calls
-
getDirection
public float getDirection()Angle of the direction vector in degrees. The default of 0.0 causes the gradient to sweep from the start color on the left to the end color on the right. Positive direction angles correspond to clockwise rotations of the default gradient.- Returns:
- Current direction value. Default value is 0.0
-
setEndColor
The end color of the gradient.- Overrides:
setEndColorin classGradient- Parameters:
endColor- New endColor value. Default value is null- Returns:
SimpleGradientinstance, for chaining setter calls- See Also:
-
getEndColor
The end color of the gradient.- Overrides:
getEndColorin classGradient- Returns:
- Current endColor value. Default value is null
- See Also:
-
setStartColor
The start color of the gradient.- Overrides:
setStartColorin classGradient- Parameters:
startColor- New startColor value. Default value is null- Returns:
SimpleGradientinstance, for chaining setter calls- See Also:
-
getStartColor
The start color of the gradient.- Overrides:
getStartColorin classGradient- Returns:
- Current startColor value. Default value is null
- See Also:
-