Package com.smartgwt.client.widgets.drawing

# Class ColorStop

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.drawing.ColorStop

All Implemented Interfaces:
  `HasHandlers`

public class ColorStop extends RefDataClass
An object containing properties that is used in Gradient types

- ## Field Summary

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

  `id`

  ### 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
  `ColorStop()`
  `ColorStop(JavaScriptObject jsObj)`
  `ColorStop(String color, float offset)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getColor()`
  eg #ff0000 or red or rgb(255,0,0)
  `float`
  `getOffset()`
  The relative offset for the color.
  `float`
  `getOpacity()`
  0 is transparent, 1 is fully opaque
  `static ColorStop`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `ColorStop`
  `setColor(String color)`
  eg #ff0000 or red or rgb(255,0,0)
  `ColorStop`
  `setOffset(float offset)`
  The relative offset for the color.
  `ColorStop`
  `setOpacity(float opacity)`
  0 is transparent, 1 is fully opaque

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

  `getRef, getRef, internalSetID`

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

  - ### ColorStop

    public ColorStop()

  - ### ColorStop

    public ColorStop(JavaScriptObject jsObj)

  - ### ColorStop

    public ColorStop(String color, float offset)

- ## Method Details

  - ### getOrCreateRef

    public static ColorStop getOrCreateRef(JavaScriptObject jsObj)

  - ### setColor

    public ColorStop setColor(String color)
    eg #ff0000 or red or rgb(255,0,0)
    Parameters:
      `color` - New color value. Default value is null
    Returns:
      `ColorStop` instance, for chaining setter calls
    See Also:
      - `CSSColor`

  - ### getColor

    public String getColor()
    eg #ff0000 or red or rgb(255,0,0)
    Returns:
      Current color value. Default value is null
    See Also:
      - `CSSColor`

  - ### setOffset

    public ColorStop setOffset(float offset)
    The relative offset for the color.
    Parameters:
      `offset` - New offset value. Default value is 0.0
    Returns:
      `ColorStop` instance, for chaining setter calls

  - ### getOffset

    public float getOffset()
    The relative offset for the color.
    Returns:
      Current offset value. Default value is 0.0

  - ### setOpacity

    public ColorStop setOpacity(float opacity)
    0 is transparent, 1 is fully opaque
    Parameters:
      `opacity` - New opacity value. Default value is 1.0
    Returns:
      `ColorStop` instance, for chaining setter calls

  - ### getOpacity

    public float getOpacity()
    0 is transparent, 1 is fully opaque
    Returns:
      Current opacity value. Default value is 1.0