Class ContextButton

    • Constructor Detail

      • ContextButton

        public ContextButton()
      • ContextButton

        public ContextButton​(Boolean enabled)
      • ContextButton

        public ContextButton​(String text)
    • Method Detail

      • setAlign

        public void setAlign​(HorizontalAlign align)
        Alignment for the buttons.

        Defaults to: right

      • setEnabled

        public void setEnabled​(Boolean enabled)
        Whether to enable buttons.

        Defaults to: true

      • setHeight

        public void setHeight​(Number height)
        Pixel height of the buttons.

        Defaults to: 20

      • setMenuItems

        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).

      • setSymbol

        public void setSymbol​(String symbol)
        The symbol for the button. Points to a definition function in the Highcharts.Renderer.symbols collection. The default exportIcon function is part of the exporting module.

        Defaults to: menu

      • setSymbolSize

        public void setSymbolSize​(Number symbolSize)
        The pixel size of the symbol on the button.

        Defaults to: 14

      • setSymbolStroke

        public void setSymbolStroke​(Color symbolStroke)
        The color of the symbol's stroke or line.

        Defaults to: #666666

      • setSymbolStrokeWidth

        public void setSymbolStrokeWidth​(Number symbolStrokeWidth)
        The pixel stroke width of the symbol on the button.

        Defaults to: 1

      • setSymbolX

        public void setSymbolX​(Number symbolX)
        The x position of the center of the symbol inside the button.

        Defaults to: 12.5

      • setSymbolY

        public void setSymbolY​(Number symbolY)
        The y position of the center of the symbol inside the button.

        Defaults to: 10.5

      • setText

        public void setText​(String text)
        A text string to add to the individual button.

        Defaults to: null

      • setTheme

        public void setTheme​(ButtonTheme theme)
        A configuration object for the button theme. The object accepts SVG properties like stroke-width, stroke and fill. Tri-state button styles are supported by the states.hover and states.select objects.
      • setVerticalAlign

        public void setVerticalAlign​(VerticalAlign verticalAlign)
        The vertical alignment of the buttons. Can be one of "top", "middle" or "bottom".

        Defaults to: top

      • setWidth

        public void setWidth​(Number width)
        The pixel width of the button.

        Defaults to: 24

      • setX

        public void setX​(Number x)
        The horizontal position of the button relative to the align option.

        Defaults to: -10

      • setY

        public void setY​(Number y)
        The vertical offset of the button's position relative to its verticalAlign. .

        Defaults to: 0