org.moxieapps.gwt.highcharts.client
Class Button<T extends Button>

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<T>
      extended by org.moxieapps.gwt.highcharts.client.Button<T>
Direct Known Subclasses:
ContextButton

public class Button<T extends Button>
extends Configurable<T>

Configurable class which allows one to control the various options for export buttons.


    chart.setExporting(
      new Exporting()
          .setContextButton(
              newContextButton(
                  .setAlign("center")
                  .setVerticalAlign("middle")
              )
     );
 

Since:
1.6.0
Author:
cskowron@moxiegroup.com (Cory Skowronek)

Nested Class Summary
static class Button.Align
          An enumeration of supported credits horizontal alignment types, which can be passed to methods like Credits.setAlign(Credits.Align) method.
static class Button.VerticalAlign
          An enumeration of supported credits vertical alignment types, which can be passed to methods like Credits.setVerticalAlign(Credits.VerticalAlign) method.
 
Constructor Summary
Button()
           
 
Method Summary
 Button setAlign(Button.Align align)
          Convenience method for setting the 'align' option for the Button module.
 Button setEnabled(Boolean enabled)
          Convenience method for setting the 'enabled' option for the Button module.
 Button setHeight(Number height)
          Convenience method for setting the 'height' option for the Button module.
 Button setSymbolFill(String symbolFill)
          Convenience method for setting the 'symbolFill' option for the Button module.
 Button setSymbolSize(Number symbolSize)
          Convenience method for setting the 'symbolSize' option for the Button module.
 Button setSymbolStroke(String symbolStroke)
          Convenience method for setting the 'symbolStroke' option for the Button module.
 Button setSymbolStrokeWidth(Number symbolStrokeWidth)
          Convenience method for setting the 'symbolStrokeWidth' option for the Button module.
 Button setSymbolX(Number symbolX)
          Convenience method for setting the 'symbolX' option for the Button module.
 Button setSymbolY(Number symbolY)
          Convenience method for setting the 'symbolY' option for the Button module.
 Button setText(String text)
          Convenience method for setting the 'text' option for the Button module.
 Button setVerticalAlign(Button.VerticalAlign verticalAlign)
          Convenience method for setting the 'verticalAlign' option for the Button module.
 Button setWidth(Number width)
          Convenience method for setting the 'width' option for the Button module.
 Button setY(Number y)
          Convenience method for setting the 'y' option for the Button module.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Button

public Button()
Method Detail

setAlign

public Button setAlign(Button.Align align)
Convenience method for setting the 'align' option for the Button module. Equivalent to:

    button.setOption("align", right)
 
The Horizontal alignment for the buttons. Can be one of "left," "center," or "right." Defaults to right

Parameters:
align - The horizontal position of the export button
Returns:
A reference to this Button instance for convenient method chaining.

setEnabled

public Button setEnabled(Boolean enabled)
Convenience method for setting the 'enabled' option for the Button module. Equivalent to:

    button.setOption("enabled", true)
 
Whether to enable buttons. Defaults to true.

Parameters:
enabled - 'true' to enable the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setHeight

public Button setHeight(Number height)
Convenience method for setting the 'height' option for the Button module. Equivalent to:

    button.setOption("height", 20)
 
Pixel height of the buttons. Defaults to 20.

Parameters:
height - The height in pixels of the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolFill

public Button setSymbolFill(String symbolFill)
Convenience method for setting the 'symbolFill' option for the Button module. Equivalent to:

    button.setOption("symbolFill", "#E0E0E0")
 
Fill color for the symbol within the button. Defaults to #E0E0E0

Parameters:
symbolFill - The color with which to fill the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolSize

public Button setSymbolSize(Number symbolSize)
Convenience method for setting the 'symbolSize' option for the Button module. Equivalent to:

    button.setOption("symbolSize", 14)
 
The pixel size of the symbol on the button. Defaults to 14.

Parameters:
symbolSize - The size in pixels of the export button symbol.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolStroke

public Button setSymbolStroke(String symbolStroke)
Convenience method for setting the 'symbolStroke' option for the Button module. Equivalent to:

    button.setOption("symbolStroke", "#666")
 
The color of the symbol's stroke or line. Defaults to #666

Parameters:
symbolStroke - The color of the export button's lines.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolStrokeWidth

public Button setSymbolStrokeWidth(Number symbolStrokeWidth)
Convenience method for setting the 'symbolStrokeWidth' option for the Button module. Equivalent to:

    button.setOption("symbolStrokeWidth", 1)
 
The pixel stroke width of the symbol on the button. Defaults to 1.

Parameters:
symbolStrokeWidth - The width in pixels of the lines on the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolX

public Button setSymbolX(Number symbolX)
Convenience method for setting the 'symbolX' option for the Button module. Equivalent to:

    button.setOption("symbolX", 12.5)
 
The x position of the center of the symbol inside the button. Defaults to 12.5.

Parameters:
symbolX - The distance in pixels of the export button from the left edge of the button.
Returns:
A reference to this Button instance for convenient method chaining.

setSymbolY

public Button setSymbolY(Number symbolY)
Convenience method for setting the 'symbolY' option for the Button module. Equivalent to:

    button.setOption("symbolY", 10.5)
 
The y position of the center of the symbol inside the button. Defaults to 10.5.

Parameters:
symbolY - The distance in pixels of the export button symbol from the top edge of the button.
Returns:
A reference to this Button instance for convenient method chaining.

setText

public Button setText(String text)
Convenience method for setting the 'text' option for the Button module. Equivalent to:

    button.setOption("text", null)
 
A text string to add to the individual button. Defaults to null

Parameters:
text - The text to display with the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setVerticalAlign

public Button setVerticalAlign(Button.VerticalAlign verticalAlign)
Convenience method for setting the 'verticalAlign' option for the Button module. Equivalent to:

    button.setOption("verticalAlign", "top")
 
The vertical alignment of the buttons. Can be one of "top", "middle" or "bottom". Defaults to top.

Parameters:
verticalAlign - The vertical position of the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setWidth

public Button setWidth(Number width)
Convenience method for setting the 'width' option for the Button module. Equivalent to:

    button.setOption("width", 24)
 
The pixel width of the button. Defaults to 24.

Parameters:
width - The width in pixels of the export button.
Returns:
A reference to this Button instance for convenient method chaining.

setY

public Button setY(Number y)
Convenience method for setting the 'y' option for the Button module. Equivalent to:

    button.setOption("y", 0)
 
The vertical offset of the button's position relative to its verticalAlign. . Defaults to 0.

Parameters:
y - The number of pixels to offset the export button from the bottom of the chart.
Returns:
A reference to this Button instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.