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
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Angle of the direction vector in degrees.The end color of the gradient.static SimpleGradient
getOrCreateRef
(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, setId
Methods 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:
SimpleGradient
instance, 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:
setEndColor
in classGradient
- Parameters:
endColor
- New endColor value. Default value is null- Returns:
SimpleGradient
instance, for chaining setter calls- See Also:
-
getEndColor
The end color of the gradient.- Overrides:
getEndColor
in classGradient
- Returns:
- Current endColor value. Default value is null
- See Also:
-
setStartColor
The start color of the gradient.- Overrides:
setStartColor
in classGradient
- Parameters:
startColor
- New startColor value. Default value is null- Returns:
SimpleGradient
instance, for chaining setter calls- See Also:
-
getStartColor
The start color of the gradient.- Overrides:
getStartColor
in classGradient
- Returns:
- Current startColor value. Default value is null
- See Also:
-