public final class Time extends NativeObjectContainer implements IsDefaultTime
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndAddToParent()
Called recursively when a property has been set in the item.
This is mandatory because it could happen that the parent item is not present, therefore it must be added. |
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
DisplayFormats |
getDisplayFormats()
Returns the displayFormats element.
|
TimeUnit |
getMinUnit()
The minimum display format to be used for a time unit.
|
protected P |
getParent()
Returns the parent element.
|
String |
getParser()
Defined as a string, it is interpreted as a custom format to be used by moment to parse the date.
|
TimeUnit |
getRound()
If defined, dates will be rounded to the start of this unit.
|
double |
getStepSize()
The number of units between grid lines.
|
String |
getTooltipFormat()
The format string to use for the tooltip.
|
TimeUnit |
getUnit()
If defined, will force the unit to be a certain type.
|
boolean |
isIsoWeekday()
If
true and the unit is set to 'week', then the first day of the week will be Monday. |
protected void |
setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for callbacks) to a model at the specific key.
|
protected void |
setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for events) to a model at the specific key.
|
void |
setIsoWeekday(boolean isoWeekday)
If
true and the unit is set to 'week', then the first day of the week will be Monday. |
void |
setMinUnit(TimeUnit unit)
The minimum display format to be used for a time unit.
|
void |
setParser(String parser)
Defined as a string, it is interpreted as a custom format to be used by moment to parse the date.
|
void |
setRound(boolean round)
If defined, dates will be rounded to the start of this unit.
|
void |
setRound(TimeUnit round)
If defined, dates will be rounded to the start of this unit.
|
void |
setStepSize(double stepSize)
The number of units between grid lines.
|
void |
setTooltipFormat(String tooltipFormat)
The format string to use for the tooltip.
|
void |
setUnit(boolean unit)
If defined, will force the unit to be a certain type.
|
void |
setUnit(TimeUnit unit)
If defined, will force the unit to be a certain type.
|
checkValue, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public DisplayFormats getDisplayFormats()
public void setIsoWeekday(boolean isoWeekday)
true
and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it will be
Sunday.isoWeekday
- if true
and the unit is set to 'week', then the first day of the week will be Monday.
Otherwise, it will be Sunday.public boolean isIsoWeekday()
true
and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it will be
Sunday.isIsoWeekday
in interface IsDefaultTime
true
and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it
will be Sunday.public void setRound(boolean round)
round
- if defined, this will override the data minimum.public void setRound(TimeUnit round)
round
- if defined, this will override the data minimum.public TimeUnit getRound()
getRound
in interface IsDefaultTime
public void setTooltipFormat(String tooltipFormat)
tooltipFormat
- format string to use for the tooltip.public String getTooltipFormat()
getTooltipFormat
in interface IsDefaultTime
public void setUnit(boolean unit)
unit
- If defined, will force the unit to be a certain type.public void setUnit(TimeUnit unit)
unit
- if defined, will force the unit to be a certain type.public TimeUnit getUnit()
getUnit
in interface IsDefaultTime
public void setStepSize(double stepSize)
stepSize
- number of units between grid lines.public double getStepSize()
getStepSize
in interface IsDefaultTime
public void setMinUnit(TimeUnit unit)
unit
- minimum display format to be used for a time unit.public TimeUnit getMinUnit()
getMinUnit
in interface IsDefaultTime
public void setParser(String parser)
parser
- defined as a string, it is interpreted as a custom format to be used by moment to parse the date.public String getParser()
getParser
in interface IsDefaultTime
protected final Key getChildKey()
null
if is a root element.protected final P getParent()
null
if is a root element.protected final D getDefaultValues()
protected final void setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model, Key key, CallbackProxy.Proxy proxy)
model
- element where adding the function proxykey
- property name to use to add the function proxyproxy
- the function proxy instance to addprotected final void setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model, Key key, CallbackProxy.Proxy proxy)
model
- element where adding the function proxykey
- property name to use to add the function proxyproxy
- the function proxy instance to addprotected final void checkAndAddToParent()