public final class GradientColor extends NativeObjectContainer
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_OFFSET_START
Offset 0 defined as default start.
|
static double |
DEFAULT_OFFSET_STOP
Offset 1 defined as default stop.
|
Constructor and Description |
---|
GradientColor(double offset,
IsColor color)
Creates a stopping gradient with its offset.
|
GradientColor(double offset,
String color)
Creates a stopping gradient with its offset.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkOffsetWithinBounds(double offset)
Any double between 0.0d and 1.0d (inclusive) is valid.
|
IsColor |
getColor()
Returns the color of the gradient.
|
String |
getColorAsString()
Returns the color of the gradient.
|
double |
getOffset()
Returns the defined offset for stopping gradient color.
|
String |
toString() |
checkDefaultValuesArgument, empty, getArrayValue, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final double DEFAULT_OFFSET_START
public static final double DEFAULT_OFFSET_STOP
public GradientColor(double offset, IsColor color)
offset
- offset of colorcolor
- color instancepublic GradientColor(double offset, String color)
offset
- offset of colorcolor
- color instancepublic double getOffset()
public String getColorAsString()
public IsColor getColor()
public static void checkOffsetWithinBounds(double offset)
offset
- value between 0 and 1 for where the color stop is located.