public final class Legend extends NativeObjectContainer implements IsDefaultLegend
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. |
LegendAlign |
getAlign()
Returns the alignment of the legend.
|
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
LegendLabels |
getLabels()
Returns the legend labels element.
|
protected P |
getParent()
Returns the parent element.
|
Position |
getPosition()
Returns the position of the legend.
|
default TextDirection |
getTextDirection()
Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the
canvas.
|
org.pepstock.charba.client.options.TextDirectioner |
getTextDirectioner()
Returns a text directioner instance to use into default methods of this interface.
|
boolean |
isDisplay()
Returns if the legend is shown.
|
boolean |
isFullWidth()
Returns if marks that this box should take the full width of the canvas (pushing down other boxes)
|
boolean |
isReverse()
Returns if the legend will show datasets in reverse order.
|
default boolean |
isRtl()
Returns
true for rendering the object from right to left. |
void |
setAlign(LegendAlign alignment)
Sets the alignment of the legend.
|
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.
|
void |
setDisplay(boolean display)
Sets if the legend is shown.
|
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 |
setFullWidth(boolean fullWidth)
Marks that this box should take the full width of the canvas (pushing down other boxes).
|
void |
setPosition(Position position)
Sets the position of the legend.
|
void |
setReverse(boolean reverse)
Sets the legend will show datasets in reverse order.
|
default void |
setRtl(boolean rtl)
Sets
true for rendering the tooltips from right to left. |
default void |
setTextDirection(TextDirection textDirection)
Sets the text direction of the tooltips that will force the text direction on the canvas for rendering the tooltips,
regardless of the CSS specified on the canvas.
|
checkValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, 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 org.pepstock.charba.client.options.TextDirectioner getTextDirectioner()
public LegendLabels getLabels()
getLabels
in interface IsDefaultLegend
public void setDisplay(boolean display)
display
- if the legend is shown.public boolean isDisplay()
isDisplay
in interface IsDefaultLegend
true
if the legend is shown.public void setFullWidth(boolean fullWidth)
fullWidth
- Marks that this box should take the full width of the canvas (pushing down other boxes)public boolean isFullWidth()
isFullWidth
in interface IsDefaultLegend
true
if marks that this box should take the full width of the canvas (pushing down other boxes).public void setReverse(boolean reverse)
reverse
- legend will show datasets in reverse order.public boolean isReverse()
isReverse
in interface IsDefaultLegend
true
if legend will show datasets in reverse order.public void setPosition(Position position)
position
- Position of the legend.public Position getPosition()
getPosition
in interface IsDefaultLegend
public void setAlign(LegendAlign alignment)
alignment
- alignment of the legend.public LegendAlign getAlign()
getAlign
in interface IsDefaultLegend
public void setRtl(boolean rtl)
true
for rendering the tooltips from right to left.rtl
- true
for rendering the tooltips from right to leftpublic boolean isRtl()
IsDefaultTextDirectioner
true
for rendering the object from right to left.isRtl
in interface IsDefaultTextDirectioner
true
for rendering the object from right to left.public void setTextDirection(TextDirection textDirection)
textDirection
- the text direction of the tooltips.public TextDirection getTextDirection()
IsDefaultTextDirectioner
getTextDirection
in interface IsDefaultTextDirectioner
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()