Package org.pepstock.charba.client.items
Class ScaleTickItem
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.ScaleTickItem
-
public final class ScaleTickItem extends NativeObjectContainer
The tick item maps the objects passed aScaleItem
.
This is a wrapper of the CHART.JS item with all needed info.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScaleTickItem.ScaleTickItemFactory
Inner class to create time tick item by a native object.
-
Field Summary
Fields Modifier and Type Field Description static ScaleTickItem.ScaleTickItemFactory
FACTORY
Public factory to create a scale tick item from a native object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Returns the label of the tick.double
getValue()
Returns the value of the tick as double.Date
getValueAsDate()
Returns the date of the tick.String
getValueAsString()
Returns the value of the tick as string.boolean
isMajor()
Returnstrue
if is the major tick, otherwiseUndefined.BOOLEAN
.-
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
FACTORY
public static final ScaleTickItem.ScaleTickItemFactory FACTORY
Public factory to create a scale tick item from a native object.
-
-
Method Detail
-
getLabel
public final String getLabel()
Returns the label of the tick.- Returns:
- the label of the tick or
Undefined.STRING
if missing.
-
getValue
public final double getValue()
Returns the value of the tick as double.- Returns:
- the value of the tick or
Undefined.DOUBLE
if missing or not a double.
-
getValueAsString
public final String getValueAsString()
Returns the value of the tick as string.- Returns:
- the value of the tick or
Undefined.STRING
if missing or not a string.
-
getValueAsDate
public Date getValueAsDate()
Returns the date of the tick.- Returns:
- the date of the tick or
null
if missing.
-
isMajor
public boolean isMajor()
Returnstrue
if is the major tick, otherwiseUndefined.BOOLEAN
.- Returns:
true
if is the major tick, otherwiseUndefined.BOOLEAN
.
-
-