public class ContextButton extends AbstractConfigurationObject
Constructor and Description |
---|
ContextButton() |
ContextButton(Boolean enabled) |
ContextButton(String text) |
Modifier and Type | Method and Description |
---|---|
HorizontalAlign |
getAlign() |
Boolean |
getEnabled() |
Number |
getHeight() |
ContextButtonMenuItem[] |
getMenuItems() |
String |
getSymbol() |
Number |
getSymbolX() |
Number |
getSymbolY() |
String |
getText() |
ButtonTheme |
getTheme() |
VerticalAlign |
getVerticalAlign() |
Number |
getWidth() |
Number |
getX() |
Number |
getY() |
void |
setAlign(HorizontalAlign align)
Alignment for the buttons.
|
void |
setEnabled(Boolean enabled)
Whether to enable buttons.
|
void |
setHeight(Number height)
Pixel height of the buttons.
|
void |
setMenuItems(ContextButtonMenuItem[] menuItems)
A collection of config options for the menu items.
|
void |
setSymbol(String symbol)
The symbol for the button.
|
void |
setSymbolX(Number symbolX)
The x position of the center of the symbol inside the button.
|
void |
setSymbolY(Number symbolY)
The y position of the center of the symbol inside the button.
|
void |
setText(String text)
A text string to add to the individual button.
|
void |
setTheme(ButtonTheme theme)
A configuration object for the button theme.
|
void |
setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of the buttons.
|
void |
setWidth(Number width)
The pixel width of the button.
|
void |
setX(Number x)
The horizontal position of the button relative to the
align
option. |
void |
setY(Number y)
The vertical offset of the button's position relative to its
verticalAlign . |
public ContextButton()
public ContextButton(Boolean enabled)
public ContextButton(String text)
public HorizontalAlign getAlign()
setAlign(HorizontalAlign)
public void setAlign(HorizontalAlign align)
Defaults to: right
public Boolean getEnabled()
setEnabled(Boolean)
public void setEnabled(Boolean enabled)
Defaults to: true
public Number getHeight()
setHeight(Number)
public void setHeight(Number height)
Defaults to: 20
public ContextButtonMenuItem[] getMenuItems()
setMenuItems(ContextButtonMenuItem[])
public void setMenuItems(ContextButtonMenuItem[] menuItems)
A collection of config options for the menu items. Each options object
consists of a text
option which is a string to show in the
menu item, as well as an onclick
parameter 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 null
to unwanted positions
(see override example below).
public String getSymbol()
setSymbol(String)
public void setSymbol(String symbol)
Highcharts.Renderer.symbols
collection. The default
exportIcon
function is part of the exporting module.
Defaults to: menu
public Number getSymbolX()
setSymbolX(Number)
public void setSymbolX(Number symbolX)
Defaults to: 12.5
public Number getSymbolY()
setSymbolY(Number)
public void setSymbolY(Number symbolY)
Defaults to: 10.5
public String getText()
setText(String)
public void setText(String text)
Defaults to: null
public ButtonTheme getTheme()
setTheme(ButtonTheme)
public void setTheme(ButtonTheme theme)
stroke-width
, stroke
and
fill
. Tri-state button styles are supported by the
states.hover
and states.select
objects.public VerticalAlign getVerticalAlign()
setVerticalAlign(VerticalAlign)
public void setVerticalAlign(VerticalAlign verticalAlign)
Defaults to: top
public Number getWidth()
setWidth(Number)
public void setWidth(Number width)
Defaults to: 24
public Number getX()
setX(Number)
public void setX(Number x)
align
option.
Defaults to: -10
public Number getY()
setY(Number)
public void setY(Number y)
verticalAlign
. .
Defaults to: 0
Copyright © 2025. All rights reserved.