Package org.pepstock.charba.client.items
Class BaseBoxNodeItem<T extends Key>
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.BaseBoxItem
-
- org.pepstock.charba.client.items.BaseBoxNodeItem<T>
-
- Type Parameters:
T
- type of position,Position
ofAxisPosition
- All Implemented Interfaces:
IsArea
- Direct Known Subclasses:
LegendNode
,ScaleItem
,SubtitleNode
,TitleNode
public abstract class BaseBoxNodeItem<T extends Key> extends BaseBoxItem
Base object which maps the CHART.JS chart items and represents main nodes of chart java script object.
This is a wrapper of the CHART.JS item with all needed info.
Implements allget
methods to change java script object properties.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description double
getMaxHeight()
Returns the max height in pixel.double
getMaxWidth()
Returns the max width in pixel.int
getPaddingBottom()
Returns the padding bottom in pixel.int
getPaddingLeft()
Returns the padding left in pixel.int
getPaddingRight()
Returns the padding right in pixel.int
getPaddingTop()
Returns the padding top in pixel.T
getPosition()
Returns the position of node.double
getWeight()
Returns the weight.boolean
isActive()
Returnstrue
if the element is active.boolean
isFullSize()
Returnstrue
if marks that this box should take the full width/height of the canvas (moving other boxes).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.items.BaseBoxItem
getBottom, getHeight, getLeft, getRight, getTop, getWidth, isInside
-
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, 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
-
isActive
public final boolean isActive()
Returnstrue
if the element is active.- Returns:
true
if the element is active.
-
isFullSize
public final boolean isFullSize()
Returnstrue
if marks that this box should take the full width/height of the canvas (moving other boxes).- Returns:
true
if marks that this box should take the full width/height of the canvas (moving other boxes)
-
getPosition
public final T getPosition()
Returns the position of node.- Returns:
- the position of node.
-
getWeight
public final double getWeight()
Returns the weight.- Returns:
- the weight.
-
getMaxWidth
public final double getMaxWidth()
Returns the max width in pixel.- Returns:
- the max width in pixel.
-
getMaxHeight
public final double getMaxHeight()
Returns the max height in pixel.- Returns:
- the max height in pixel.
-
getPaddingTop
public final int getPaddingTop()
Returns the padding top in pixel.- Returns:
- the padding top in pixel.
-
getPaddingRight
public final int getPaddingRight()
Returns the padding right in pixel.- Returns:
- the padding right in pixel.
-
getPaddingBottom
public final int getPaddingBottom()
Returns the padding bottom in pixel.- Returns:
- the padding bottom in pixel.
-
getPaddingLeft
public final int getPaddingLeft()
Returns the padding left in pixel.- Returns:
- the padding left in pixel.
-
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
-
-