org.moxieapps.gwt.highcharts.client.plotOptions
Class BaseGaugePart<T extends BaseGaugePart>

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<T>
      extended by org.moxieapps.gwt.highcharts.client.plotOptions.BaseGaugePart<T>
Direct Known Subclasses:
Dial, Pivot

public abstract class BaseGaugePart<T extends BaseGaugePart>
extends Configurable<T>

A common base class for both Dial and Pivot to prevent code duplication while still maintaining a cleaner way for the user to utilize the method chaining with the generics in place. You should not use this class directly, but instead use one of the base classes.

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

Constructor Summary
BaseGaugePart()
           
 
Method Summary
 T setBackgroundColor(Color backgroundColor)
          Convenience method for setting the "backgroundColor" option for a gauge's pivot.
 T setBackgroundColor(String backgroundColor)
          Convenience method for setting the "backgroundColor" option for a gauge's pivot.
 T setBorderColor(Color borderColor)
          Convenience method for setting the "borderColor" option for a gauge's pivot.
 T setBorderColor(String borderColor)
          Convenience method for setting the "borderColor" option for a gauge's pivot.
 T setBorderWidth(Number borderWidth)
          Convenience method for setting the "borderWidth" option for a gauge's pivot.
 T setRadius(String radius)
          Convenience method for setting the "radius" option for a gauge's pivot.
 
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

BaseGaugePart

public BaseGaugePart()
Method Detail

setBackgroundColor

public T setBackgroundColor(String backgroundColor)
Convenience method for setting the "backgroundColor" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("backgroundColor", #CCCCCC)
 
The background or fill color of the gauge's pivot. Defaults to black.

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setBackgroundColor(org.moxieapps.gwt.highcharts.client.Color) version instead.

Parameters:
backgroundColor - The value to set as the 'backgroundColor' option of the box plots.
Returns:
A reference to this BaseGaugePart for convenient method chaining.

setBackgroundColor

public T setBackgroundColor(Color backgroundColor)
Convenience method for setting the "backgroundColor" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("fillColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The background or fill color of the gauge's pivot. Defaults to black.

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setBackgroundColor(String) version instead.

Parameters:
backgroundColor - The color gradient or color with an alpha channel to set as the 'backgroundColor' option of the box plot.
Returns:
A reference to this BaseGaugePart for convenient method chaining

setBorderColor

public T setBorderColor(String borderColor)
Convenience method for setting the "borderColor" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("borderColor", #CCCCCC);
 
The border color or stroke of the gauge's pivot. By default, the borderWidth is 0, so this must be set in addition to a custom border color. Defaults to silver.

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setBorderColor(Color) version instead.

Parameters:
borderColor - The value to set as the 'borderColor' option of the box plots.
Returns:
A reference to this BaseGaugePart for convenient method chaining

setBorderColor

public T setBorderColor(Color borderColor)
Convenience method for setting the "borderColor" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("fillColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The border color or stroke of the gauge's pivot. By default, the borderWidth is 0, so this must be set in addition to a custom border color. Defaults to silver.

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setBorderColor(String) version instead.

Parameters:
borderColor - The color gradient or color with an alpha channel to set as the 'borderColor' option of the box plot.
Returns:
A reference to this BaseGaugePart for convenient method chaining

setBorderWidth

public T setBorderWidth(Number borderWidth)
Convenience method for setting the "borderWidth" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("borderWidth", 5);
 
The width of the gauge pivot border in pixels. Defaults to 0.

Parameters:
borderWidth - The width of the gauge pivot border in pixels.
Returns:
A reference to this BaseGaugePart for convenient method chaining

setRadius

public T setRadius(String radius)
Convenience method for setting the "radius" option for a gauge's pivot. Equivalent to:

     pivotOptions.setOption("radius", "50%");
 
The radius or length of the pivot, in percentages relative to the radius of the gauge itself. Defaults to 80%.

Parameters:
radius - The radius of the pivot as a percentage of the radius of the gauge itself.
Returns:
A reference to this BaseGaugePart for convenient method chaining


Copyright © 2015. All Rights Reserved.