Class DefaultChartLegend
- java.lang.Object
-
- org.pepstock.charba.client.defaults.chart.DefaultChartLegend
-
- All Implemented Interfaces:
IsDefaultEventHandler,IsDefaultLegend,IsDefaultPluginElement,IsDefaultTextDirectionHandler
public final class DefaultChartLegend extends Object implements IsDefaultLegend
Defaults for legend option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description DefaultChartLegend(IsDefaultLegend legend)Creates the object by legend option element instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementAligngetAlign()Returns the alignment of the element.Set<Event>getEvents()Returns the browser events that the chart should listen to.IsDefaultLegendLabelsgetLabels()Returns the labels object defaults.intgetMaxHeight()Returns the maximum height of the legend, in pixels.intgetMaxWidth()Returns the maximum width of the legend, in pixels.PositiongetPosition()Returns the position of element.TextDirectiongetTextDirection()Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.IsDefaultLegendTitlegetTitle()Returns the title object defaults.booleanisDisplay()Returns if the element is shown.booleanisFullSize()Returnstrueif marks that this box should take the full width/height of the canvas (moving other boxes).booleanisReverse()Returns if the legend will show datasets in reverse order.booleanisRtl()Returnstruefor rendering the object from right to left.
-
-
-
Constructor Detail
-
DefaultChartLegend
public DefaultChartLegend(IsDefaultLegend legend)
Creates the object by legend option element instance.- Parameters:
legend- legend option element instance.
-
-
Method Detail
-
getLabels
public IsDefaultLegendLabels getLabels()
Description copied from interface:IsDefaultLegendReturns the labels object defaults.- Specified by:
getLabelsin interfaceIsDefaultLegend- Returns:
- the labels object instance
-
getTitle
public IsDefaultLegendTitle getTitle()
Description copied from interface:IsDefaultLegendReturns the title object defaults.- Specified by:
getTitlein interfaceIsDefaultLegend- Returns:
- the title object instance
-
getEvents
public Set<Event> getEvents()
Description copied from interface:IsDefaultEventHandlerReturns the browser events that the chart should listen to.- Specified by:
getEventsin interfaceIsDefaultEventHandler- Returns:
- the browser events that the chart should listen to.
-
isDisplay
public boolean isDisplay()
Description copied from interface:IsDefaultPluginElementReturns if the element is shown.- Specified by:
isDisplayin interfaceIsDefaultPluginElement- Returns:
- if the element is shown.
-
isFullSize
public boolean isFullSize()
Description copied from interface:IsDefaultLegendReturnstrueif marks that this box should take the full width/height of the canvas (moving other boxes).- Specified by:
isFullSizein interfaceIsDefaultLegend- Returns:
trueif marks that this box should take the full width/height of the canvas (moving other boxes)
-
isReverse
public boolean isReverse()
Description copied from interface:IsDefaultLegendReturns if the legend will show datasets in reverse order.- Specified by:
isReversein interfaceIsDefaultLegend- Returns:
- legend will show datasets in reverse order.
-
getPosition
public Position getPosition()
Description copied from interface:IsDefaultPluginElementReturns the position of element.- Specified by:
getPositionin interfaceIsDefaultPluginElement- Returns:
- the position of element.
-
getAlign
public ElementAlign getAlign()
Description copied from interface:IsDefaultPluginElementReturns the alignment of the element.- Specified by:
getAlignin interfaceIsDefaultPluginElement- Returns:
- alignment of the element.
-
isRtl
public boolean isRtl()
Description copied from interface:IsDefaultTextDirectionHandlerReturnstruefor rendering the object from right to left.- Specified by:
isRtlin interfaceIsDefaultTextDirectionHandler- Returns:
truefor rendering the object from right to left.
-
getTextDirection
public TextDirection getTextDirection()
Description copied from interface:IsDefaultTextDirectionHandlerReturns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.- Specified by:
getTextDirectionin interfaceIsDefaultTextDirectionHandler- Returns:
- the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas
-
getMaxWidth
public int getMaxWidth()
Description copied from interface:IsDefaultLegendReturns the maximum width of the legend, in pixels.- Specified by:
getMaxWidthin interfaceIsDefaultLegend- Returns:
- the maximum width of the legend, in pixels
-
getMaxHeight
public int getMaxHeight()
Description copied from interface:IsDefaultLegendReturns the maximum height of the legend, in pixels.- Specified by:
getMaxHeightin interfaceIsDefaultLegend- Returns:
- the maximum height of the legend, in pixels
-
-