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:
    com.google.gwt.event.shared.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 and Description
    `SimpleGradient()`
    `SimpleGradient(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete 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(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getStartColor()` The start color of the gradient.
    `SimpleGradient` | `setDirection(float direction)` Angle of the direction vector in degrees.
    `SimpleGradient` | `setEndColor(java.lang.String endColor)` The end color of the gradient.
    `SimpleGradient` | `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(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static SimpleGradient getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setDirection

          public SimpleGradient 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` - 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

          public SimpleGradient setEndColor(java.lang.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 java.lang.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(java.lang.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 java.lang.String getStartColor()

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