Class Gradient
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.colors.CanvasObject
- 
- org.pepstock.charba.client.colors.Gradient
 
 
 
- 
 public final class Gradient extends CanvasObject A gradient is an image consisting of a progressive transition between two or more colors.
 Could beLinearorRadial.
 Can be created using the size ofCANVASorCHARTarea.
 The orientation to have a progressive transition, is defined by an enumeration in order to creates the gradient using the right coordinates and dimension, based on existing items (canvas and chart).- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<GradientColor>getColors()Returns the unmodifiable list of stopping colors.IsColorgetInterpolatedColorByOffset(double offset)Returns a color using the gradient as source of colors.GradientOrientationgetOrientation()Returns the gradient orientation.GradientScopegetScope()Returns the gradient scope.GradientTypegetType()Returns the gradient type.inthashCode()- 
Methods inherited from class org.pepstock.charba.client.colors.CanvasObjectgetId
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckDefaultValuesArgument, empty, getArrayValue, getElement, 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, setElement, 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
 
- 
 
- 
- 
- 
Method Detail- 
getTypepublic GradientType getType() Returns the gradient type.- Returns:
- the gradient type
 
 - 
getOrientationpublic GradientOrientation getOrientation() Returns the gradient orientation.- Returns:
- the gradient orientation
 
 - 
getScopepublic GradientScope getScope() Returns the gradient scope.- Returns:
- the gradient scope
 
 - 
getColorspublic List<GradientColor> getColors() Returns the unmodifiable list of stopping colors.- Returns:
- the unmodifiable list of stopping colors.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- CanvasObject
 
 - 
equalspublic boolean equals(Object obj) - Overrides:
- equalsin class- CanvasObject
 
 - 
getInterpolatedColorByOffsetpublic IsColor getInterpolatedColorByOffset(double offset) Returns a color using the gradient as source of colors.- Parameters:
- offset- offset to search in the gradient colors
- Returns:
- a color based on offset.
 
 
- 
 
-