Package org.pepstock.charba.client.items
Class AxisPositionItem
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.AxisPositionItem
-
public final class AxisPositionItem extends NativeObjectContainer
This item is used to define the position of an axis related to a value of another axis.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description AxisPositionItem()
Creates an empty item.AxisPositionItem(String id, double value)
Creates an item with the position.AxisPositionItem(String id, String value)
Creates an item with the position.AxisPositionItem(String id, Date value)
Creates an item with the position.AxisPositionItem(OptionsEnvelop<NativeObject> envelop)
Creates the item using an envelop of native java script object which contains all properties.AxisPositionItem(ScaleId id, double value)
Creates an item with the position.AxisPositionItem(ScaleId id, String value)
Creates an item with the position.AxisPositionItem(ScaleId id, Date value)
Creates an item with the position.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleId
getScaleId()
Returns the scale id set for positioning.double
getValue()
Returns the value on the axis used for positioning.Date
getValueAsDate()
Returns the value on the axis used for positioning.String
getValueAsString()
Returns the value on the axis used for positioning.boolean
isConsistent()
Returnstrue
if the item is consistent.NativeObject
nativeObject()
Returns the native object instance.void
setPosition(String id, double value)
Sets the position of another scale.void
setPosition(String id, String value)
Sets the position of another scale.void
setPosition(String id, Date value)
Sets the position of another scale.void
setPosition(ScaleId id, double value)
Sets the position of another scale.void
setPosition(ScaleId id, String value)
Sets the position of another scale.void
setPosition(ScaleId id, Date value)
Sets the position of another scale.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
AxisPositionItem
public AxisPositionItem(OptionsEnvelop<NativeObject> envelop)
Creates the item using an envelop of native java script object which contains all properties.- Parameters:
envelop
- envelop of native java script object which contains all properties.
-
AxisPositionItem
public AxisPositionItem(ScaleId id, double value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem(String id, double value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem(ScaleId id, String value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem(String id, String value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem(ScaleId id, Date value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem(String id, Date value)
Creates an item with the position.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
AxisPositionItem
public AxisPositionItem()
Creates an empty item.
-
-
Method Detail
-
getScaleId
public ScaleId getScaleId()
Returns the scale id set for positioning.- Returns:
- the scale id set for positioning
-
getValue
public double getValue()
Returns the value on the axis used for positioning.- Returns:
- the value on the axis used for positioning
-
getValueAsString
public String getValueAsString()
Returns the value on the axis used for positioning.- Returns:
- the value on the axis used for positioning
-
getValueAsDate
public Date getValueAsDate()
Returns the value on the axis used for positioning.- Returns:
- the value on the axis used for positioning
-
setPosition
public void setPosition(ScaleId id, double value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
setPosition
public void setPosition(String id, double value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
setPosition
public void setPosition(ScaleId id, String value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
setPosition
public void setPosition(String id, String value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
setPosition
public void setPosition(ScaleId id, Date value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
setPosition
public void setPosition(String id, Date value)
Sets the position of another scale.- Parameters:
id
- scale id to use for positioningvalue
- value of the scale id to use as position
-
isConsistent
public boolean isConsistent()
Returnstrue
if the item is consistent.- Returns:
true
if the item is consistent
-
nativeObject
public NativeObject nativeObject()
Returns the native object instance.- Returns:
- the native object instance.
-
-