Package org.pepstock.charba.client.items
Class ScalesNode
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.ScalesNode
-
public final class ScalesNode extends NativeObjectContainer
Wrapper of scales node of CHART.JS.
This is a wrapper of scale node of Chart (of CHART.JS).- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description ScalesNode(ChartEnvelop<NativeObject> envelop)
Creates the item using an envelop with the native java script object which contains all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description Map<String,ScaleItem>
getItems()
Returns a map with all defined axis.ScaleItem
getScaleIsInside(NativeAbstractMouseEvent event)
Returns the scale item if the chart event is inside of one of scales, otherwisenull
.boolean
isInside(NativeAbstractMouseEvent event)
Returnstrue
if the chart event is inside of one of scales, otherwisefalse
.default boolean
isInside(NativeBaseEvent event)
Returnstrue
if the chart event is inside of a chart element, otherwisefalse
.default boolean
isInside(HasNativeEvent container)
Returnstrue
if the chart event is inside of this box, otherwisefalse
.-
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
-
-
-
-
Constructor Detail
-
ScalesNode
public ScalesNode(ChartEnvelop<NativeObject> envelop)
Creates the item using an envelop with the native java script object which contains all properties.- Parameters:
envelop
- envelop with the native java script object which contains all properties.
-
-
Method Detail
-
getItems
public Map<String,ScaleItem> getItems()
Returns a map with all defined axis. Key is the scale ID and value is scale item.- Returns:
- a map with all defined axis. Key is the scale ID and value is scale item.
-
getScaleIsInside
public ScaleItem getScaleIsInside(NativeAbstractMouseEvent event)
Returns the scale item if the chart event is inside of one of scales, otherwisenull
.- Parameters:
event
- event to check if inside of one of scales.- Returns:
- the scale item if the chart event is inside of one of scales, otherwise
null
-
isInside
public boolean isInside(NativeAbstractMouseEvent event)
Returnstrue
if the chart event is inside of one of scales, otherwisefalse
.- Parameters:
event
- event to check if inside of one of scales.- Returns:
true
if the chart event is inside of one of scales, otherwisefalse
-
isInside
public default boolean isInside(NativeBaseEvent event)
Returnstrue
if the chart event is inside of a chart element, otherwisefalse
.- Parameters:
event
- event to check if inside of a chart element.- Returns:
true
if the chart event is inside a chart element, otherwisefalse
-
isInside
public default boolean isInside(HasNativeEvent container)
Returnstrue
if the chart event is inside of this box, otherwisefalse
.- Parameters:
container
- event container to check if inside the box- Returns:
true
if the chart event is inside of this box, otherwisefalse
-
-