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

-     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 and Description
    `SimpleGradient()`
    `SimpleGradient(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `getDirection()` Angle of the direction vector in degrees.
    `java.lang.String` | `getEndColor()` The end color of the gradient.
    `static SimpleGradient` | `getOrCreateRef(JavaScriptObject jsObj)`
    `java.lang.String` | `getStartColor()` The start color of the gradient.
    `void` | `setDirection(float direction)` Angle of the direction vector in degrees.
    `void` | `setEndColor(java.lang.String endColor)` The end color of the gradient.
    `void` | `setStartColor(java.lang.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, 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 Detail

    - #### SimpleGradient

          public SimpleGradient()

    - #### SimpleGradient

          public SimpleGradient(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static SimpleGradient getOrCreateRef(JavaScriptObject jsObj)

    - #### setDirection

          public void setDirection(float 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.
      Parameters:
        `direction` - Default value is 0.0

    - #### 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:
        float

    - #### setEndColor

          public void setEndColor(java.lang.String endColor)

      The end color of the gradient.
      Overrides:
        `setEndColor` in class `Gradient`
      Parameters:
        `endColor` - See `CSSColor` . Default value is null

    - #### getEndColor

          public java.lang.String getEndColor()

      The end color of the gradient.
      Overrides:
        `getEndColor` in class `Gradient`
      Returns:
        See `CSSColor`

    - #### setStartColor

          public void setStartColor(java.lang.String startColor)

      The start color of the gradient.
      Overrides:
        `setStartColor` in class `Gradient`
      Parameters:
        `startColor` - See `CSSColor` . Default value is null

    - #### getStartColor

          public java.lang.String getStartColor()

      The start color of the gradient.
      Overrides:
        `getStartColor` in class `Gradient`
      Returns:
        See `CSSColor`