public final class Legend extends AbstractModel<Plugins,T> implements IsDefaultLegend
| Modifier and Type | Method and Description |
|---|---|
ElementAlign |
getAlign()
Returns the alignment of the element.
|
Set<Event> |
getEvents()
Returns the browser events that the legend should listen to.
|
LegendLabels |
getLabels()
Returns the legend labels element.
|
int |
getMaxHeight()
Returns the maximum width of the legend, in pixels.
|
int |
getMaxWidth()
Returns the maximum width of the legend, in pixels.
|
Position |
getPosition()
Returns the position of element.
|
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.TextDirectionHandler |
getTextDirectionHandler()
Returns a text direction handler instance to use in the default methods of this interface.
|
LegendTitle |
getTitle()
Returns the legend title element.
|
boolean |
isDisplay()
Returns
true if the element is shown. |
boolean |
isFullSize()
Returns if that this box should take the full width/height of the canvas (moving 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(ElementAlign alignment)
Sets the alignment of the element.
|
void |
setDisplay(boolean display)
Sets
true if the element is shown. |
void |
setEvents(Event... events)
Sets the browser events that the legend should listen to.
|
void |
setEvents(Set<Event> events)
Sets the browser events that the legend should listen to.
|
void |
setFullSize(boolean fullSize)
Marks that this box should take the full width/height of the canvas (moving other boxes).
|
void |
setMaxHeight(int maxHeight)
Sets the maximum height of the legend, in pixels.
|
void |
setMaxWidth(int maxWidth)
Sets the maximum width of the legend, in pixels.
|
void |
setPosition(Position position)
Sets the position of element.
|
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.
|
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModelcheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, 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, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlign, getPosition, isDisplaypublic org.pepstock.charba.client.options.TextDirectionHandler getTextDirectionHandler()
public LegendLabels getLabels()
getLabels in interface IsDefaultLegendpublic LegendTitle getTitle()
getTitle in interface IsDefaultLegendpublic void setEvents(Event... events)
events - the browser events that the legend should listen to.public void setEvents(Set<Event> events)
events - the browser events that the legend should listen to.public Set<Event> getEvents()
getEvents in interface IsDefaultLegendpublic void setMaxWidth(int maxWidth)
maxWidth - the maximum width of the legend, in pixelspublic int getMaxWidth()
getMaxWidth in interface IsDefaultLegendpublic void setMaxHeight(int maxHeight)
maxHeight - the maximum height of the legend, in pixelspublic int getMaxHeight()
getMaxHeight in interface IsDefaultLegendpublic void setFullSize(boolean fullSize)
fullSize - Marks that this box should take the full width/height of the canvas (moving other boxes)public boolean isFullSize()
isFullSize in interface IsDefaultLegendtrue if that this box should take the full width/height of the canvas (moving other boxes).public void setReverse(boolean reverse)
reverse - legend will show datasets in reverse order.public boolean isReverse()
isReverse in interface IsDefaultLegendtrue if legend will show datasets in reverse order.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()
IsDefaultTextDirectionHandlertrue for rendering the object from right to left.isRtl in interface IsDefaultTextDirectionHandlertrue for rendering the object from right to left.public void setTextDirection(TextDirection textDirection)
textDirection - the text direction of the tooltips.public TextDirection getTextDirection()
IsDefaultTextDirectionHandlergetTextDirection in interface IsDefaultTextDirectionHandlerpublic void setDisplay(boolean display)
true if the element is shown.display - if true the element is shown.public boolean isDisplay()
true if the element is shown.isDisplay in interface IsDefaultPluginElementtrue the element is shown.public void setPosition(Position position)
position - the position of element.public Position getPosition()
getPosition in interface IsDefaultPluginElementpublic void setAlign(ElementAlign alignment)
alignment - alignment of the element.public ElementAlign getAlign()
getAlign in interface IsDefaultPluginElement