Class ContextButton
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.ContextButton
-
- All Implemented Interfaces:
Serializable
public class ContextButton extends AbstractConfigurationObject
Options for the export button.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContextButton()ContextButton(Boolean enabled)ContextButton(String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalAligngetAlign()BooleangetEnabled()NumbergetHeight()ContextButtonMenuItem[]getMenuItems()StringgetSymbol()ColorgetSymbolFill()NumbergetSymbolSize()ColorgetSymbolStroke()NumbergetSymbolStrokeWidth()NumbergetSymbolX()NumbergetSymbolY()StringgetText()ButtonThemegetTheme()VerticalAligngetVerticalAlign()NumbergetWidth()NumbergetX()NumbergetY()voidsetAlign(HorizontalAlign align)Alignment for the buttons.voidsetEnabled(Boolean enabled)Whether to enable buttons.voidsetHeight(Number height)Pixel height of the buttons.voidsetMenuItems(ContextButtonMenuItem[] menuItems)A collection of config options for the menu items.voidsetSymbol(String symbol)The symbol for the button.voidsetSymbolFill(Color symbolFill)See navigation.buttonOptions => symbolFill.voidsetSymbolSize(Number symbolSize)The pixel size of the symbol on the button.voidsetSymbolStroke(Color symbolStroke)The color of the symbol's stroke or line.voidsetSymbolStrokeWidth(Number symbolStrokeWidth)The pixel stroke width of the symbol on the button.voidsetSymbolX(Number symbolX)The x position of the center of the symbol inside the button.voidsetSymbolY(Number symbolY)The y position of the center of the symbol inside the button.voidsetText(String text)A text string to add to the individual button.voidsetTheme(ButtonTheme theme)A configuration object for the button theme.voidsetVerticalAlign(VerticalAlign verticalAlign)The vertical alignment of the buttons.voidsetWidth(Number width)The pixel width of the button.voidsetX(Number x)The horizontal position of the button relative to thealignoption.voidsetY(Number y)The vertical offset of the button's position relative to itsverticalAlign.
-
-
-
Method Detail
-
getAlign
public HorizontalAlign getAlign()
- See Also:
setAlign(HorizontalAlign)
-
setAlign
public void setAlign(HorizontalAlign align)
Alignment for the buttons.Defaults to: right
-
getEnabled
public Boolean getEnabled()
- See Also:
setEnabled(Boolean)
-
setEnabled
public void setEnabled(Boolean enabled)
Whether to enable buttons.Defaults to: true
-
getHeight
public Number getHeight()
- See Also:
setHeight(Number)
-
setHeight
public void setHeight(Number height)
Pixel height of the buttons.Defaults to: 20
-
getMenuItems
public ContextButtonMenuItem[] getMenuItems()
- See Also:
setMenuItems(ContextButtonMenuItem[])
-
setMenuItems
public void setMenuItems(ContextButtonMenuItem[] menuItems)
A collection of config options for the menu items. Each options object consists of a
textoption which is a string to show in the menu item, as well as anonclickparameter which is a callback function to run on click.By default, there is the "Print" menu item plus one menu item for each of the available export types. Menu items can be customized by defining a new array of items and assigning
nullto unwanted positions (see override example below).
-
getSymbol
public String getSymbol()
- See Also:
setSymbol(String)
-
setSymbol
public void setSymbol(String symbol)
The symbol for the button. Points to a definition function in theHighcharts.Renderer.symbolscollection. The defaultexportIconfunction is part of the exporting module.Defaults to: menu
-
getSymbolFill
public Color getSymbolFill()
- See Also:
setSymbolFill(Color)
-
setSymbolFill
public void setSymbolFill(Color symbolFill)
See navigation.buttonOptions => symbolFill.Defaults to: #666666
-
getSymbolSize
public Number getSymbolSize()
- See Also:
setSymbolSize(Number)
-
setSymbolSize
public void setSymbolSize(Number symbolSize)
The pixel size of the symbol on the button.Defaults to: 14
-
getSymbolStroke
public Color getSymbolStroke()
- See Also:
setSymbolStroke(Color)
-
setSymbolStroke
public void setSymbolStroke(Color symbolStroke)
The color of the symbol's stroke or line.Defaults to: #666666
-
getSymbolStrokeWidth
public Number getSymbolStrokeWidth()
- See Also:
setSymbolStrokeWidth(Number)
-
setSymbolStrokeWidth
public void setSymbolStrokeWidth(Number symbolStrokeWidth)
The pixel stroke width of the symbol on the button.Defaults to: 1
-
getSymbolX
public Number getSymbolX()
- See Also:
setSymbolX(Number)
-
setSymbolX
public void setSymbolX(Number symbolX)
The x position of the center of the symbol inside the button.Defaults to: 12.5
-
getSymbolY
public Number getSymbolY()
- See Also:
setSymbolY(Number)
-
setSymbolY
public void setSymbolY(Number symbolY)
The y position of the center of the symbol inside the button.Defaults to: 10.5
-
getText
public String getText()
- See Also:
setText(String)
-
setText
public void setText(String text)
A text string to add to the individual button.Defaults to: null
-
getTheme
public ButtonTheme getTheme()
- See Also:
setTheme(ButtonTheme)
-
setTheme
public void setTheme(ButtonTheme theme)
A configuration object for the button theme. The object accepts SVG properties likestroke-width,strokeandfill. Tri-state button styles are supported by thestates.hoverandstates.selectobjects.
-
getVerticalAlign
public VerticalAlign getVerticalAlign()
- See Also:
setVerticalAlign(VerticalAlign)
-
setVerticalAlign
public void setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of the buttons. Can be one of "top", "middle" or "bottom".Defaults to: top
-
getWidth
public Number getWidth()
- See Also:
setWidth(Number)
-
setWidth
public void setWidth(Number width)
The pixel width of the button.Defaults to: 24
-
getX
public Number getX()
- See Also:
setX(Number)
-
setX
public void setX(Number x)
The horizontal position of the button relative to thealignoption.Defaults to: -10
-
getY
public Number getY()
- See Also:
setY(Number)
-
setY
public void setY(Number y)
The vertical offset of the button's position relative to itsverticalAlign. .Defaults to: 0
-
-