Package org.pepstock.charba.client.items
Class ElementProperties
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.ElementProperties
-
public final class ElementProperties extends NativeObjectContainer
Maps all properties of the element, as result ofChartElement.getFinalPositionProps(Key...)
method.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBooleanValue(Key key)
Returns a value (boolean) in the embedded JavaScript object at specific property.CanvasGradientItem
getCanvasGradientValue(Key key)
Returns a value ((CanvasGradientItem
)) in the embedded JavaScript object at specific property.CanvasPatternItem
getCanvasPatternValue(Key key)
Returns a value (CanvasPatternItem
) in the embedded JavaScript object at specific property.Canvas
getCanvasValue(Key key)
Returns a value (canvas) in the embedded JavaScript object at specific property.Date
getDateValue(Key key)
Returns a value (date) in the embedded JavaScript object at specific property.double
getDoubleValue(Key key)
Returns a value (double) in the embedded JavaScript object at specific property.List<Double>
getDoubleValues(Key key)
Returns a value (list of doubles) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a double.<T extends Key>
TgetEnumeratedValue(Key key, T[] enumValues)
Returns a value (key) in the embedded JavaScript object at specific property.<T extends Key>
List<T>getEnumeratedValues(Key key, T[] enumValues)
Returns a value (list ofKey
) in the embedded JavaScript object at specific property.BaseHtmlElement
getHtmlElementValue(Key key)
Returns a value (BaseHtmlElement) in the embedded JavaScript object at specific property.Img
getImgValue(Key key)
Returns a value (image) in the embedded JavaScript object at specific property.int
getIntValue(Key key)
Returns a value (int) in the embedded JavaScript object at specific property.List<Integer>
getIntValues(Key key)
Returns a value (list of integers) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a integer.List<Key>
getProperties()
Returns the properties of this object.ObjectType
getPropertyType(Key key)
Returns the java script type of the property.String
getStringValue(Key key)
Returns a value (string) in the embedded JavaScript object at specific property.List<String>
getStringValues(Key key)
Returns a value (list of strings) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a string.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, 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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getProperties
public List<Key> getProperties()
Returns the properties of this object.- Returns:
- the properties of this object
-
getPropertyType
public ObjectType getPropertyType(Key key)
Returns the java script type of the property.- Parameters:
key
- name of the java script property.- Returns:
- the java script type of the property.
-
getIntValue
public int getIntValue(Key key)
Returns a value (int) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getIntValues
public List<Integer> getIntValues(Key key)
Returns a value (list of integers) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a integer.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property (list of integers)
-
getDoubleValue
public double getDoubleValue(Key key)
Returns a value (double) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getDoubleValues
public List<Double> getDoubleValues(Key key)
Returns a value (list of doubles) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a double.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property (list of doubles)
-
getBooleanValue
public boolean getBooleanValue(Key key)
Returns a value (boolean) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getStringValue
public String getStringValue(Key key)
Returns a value (string) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getStringValues
public List<String> getStringValues(Key key)
Returns a value (list of strings) in the embedded JavaScript object at specific property.
This must be used when a java script property can contain an array or a string.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property (list of strings)
-
getDateValue
public Date getDateValue(Key key)
Returns a value (date) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getCanvasValue
public Canvas getCanvasValue(Key key)
Returns a value (canvas) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getImgValue
public Img getImgValue(Key key)
Returns a value (image) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getCanvasGradientValue
public CanvasGradientItem getCanvasGradientValue(Key key)
Returns a value ((CanvasGradientItem
)) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getCanvasPatternValue
public CanvasPatternItem getCanvasPatternValue(Key key)
Returns a value (CanvasPatternItem
) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
getEnumeratedValue
public <T extends Key> T getEnumeratedValue(Key key, T[] enumValues)
Returns a value (key) in the embedded JavaScript object at specific property.- Type Parameters:
T
- type of key- Parameters:
key
- key of the property of JavaScript object.enumValues
- all enumeration values- Returns:
- value of the property
-
getEnumeratedValues
public <T extends Key> List<T> getEnumeratedValues(Key key, T[] enumValues)
Returns a value (list ofKey
) in the embedded JavaScript object at specific property.- Type Parameters:
T
- type of key- Parameters:
key
- key of the property of JavaScript object.enumValues
- all enumeration values- Returns:
- value of the property (list of
Key
)
-
getHtmlElementValue
public BaseHtmlElement getHtmlElementValue(Key key)
Returns a value (BaseHtmlElement) in the embedded JavaScript object at specific property.- Parameters:
key
- key of the property of JavaScript object.- Returns:
- value of the property
-
-