Package com.smartgwt.client.widgets.drawing

# 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`

public class SimpleGradient extends Gradient
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`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleGradient()`
  `SimpleGradient(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getEndColor()`
  The end color of the gradient.
  `static SimpleGradient`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `getStartColor()`
  The start color of the gradient.
  `SimpleGradient`
  `setDirection(double direction)`
  Angle of the direction vector in degrees.
  `SimpleGradient`
  `setEndColor(String endColor)`
  The end color of the gradient.
  `SimpleGradient`
  `setStartColor(String startColor)`
  The start color of the gradient.

  ### Methods inherited from class com.smartgwt.client.widgets.drawing.Gradient

  `getColorStops, getDirection, 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`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SimpleGradient

    public SimpleGradient()

  - ### SimpleGradient

    public SimpleGradient(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static SimpleGradient getOrCreateRef(JavaScriptObject jsObj)

  - ### setDirection

    public SimpleGradient setDirection(double direction)
    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.
    Overrides:
      `setDirection` in class `Gradient`
    Parameters:
      `direction` - New direction value. Default value is 0.0
    Returns:
      `SimpleGradient` instance, for chaining setter calls

  - ### setEndColor

    public SimpleGradient setEndColor(String endColor)
    The end color of the gradient.
    Overrides:
      `setEndColor` in class `Gradient`
    Parameters:
      `endColor` - New endColor value. Default value is null
    Returns:
      `SimpleGradient` instance, for chaining setter calls
    See Also:
      - `CSSColor`

  - ### getEndColor

    public String getEndColor()
    The end color of the gradient.
    Overrides:
      `getEndColor` in class `Gradient`
    Returns:
      Current endColor value. Default value is null
    See Also:
      - `CSSColor`

  - ### setStartColor

    public SimpleGradient setStartColor(String startColor)
    The start color of the gradient.
    Overrides:
      `setStartColor` in class `Gradient`
    Parameters:
      `startColor` - New startColor value. Default value is null
    Returns:
      `SimpleGradient` instance, for chaining setter calls
    See Also:
      - `CSSColor`

  - ### getStartColor

    public String getStartColor()
    The start color of the gradient.
    Overrides:
      `getStartColor` in class `Gradient`
    Returns:
      Current startColor value. Default value is null
    See Also:
      - `CSSColor`