org.moxieapps.gwt.highcharts.client
Class Scrollbar

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<Scrollbar>
      extended by org.moxieapps.gwt.highcharts.client.Scrollbar

public class Scrollbar
extends Configurable<Scrollbar>

A configurable class that can be used to represent custom scrollbar options within a StockChart, which can then be set on the chart (via the StockChart.setScrollbar(Scrollbar) method.) The scrollbar is a means of panning over the X axis of a chart. Example usage:

   stockChart.setScrollbar(
     new Scrollbar()
       .setBarBorderColor("#CC0000")
       .setMinWidth(5)
   );
 

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

Constructor Summary
Scrollbar()
           
 
Method Summary
 Scrollbar setBarBackgroundColor(String barBackgroundColor)
          Convenience method for setting the "barBackgroundColor" option for the scrollbar.
 Scrollbar setBarBorderRadius(Number borderRadius)
          Convenience method for setting the "borderRadius" option for the scrollbar.
 Scrollbar setBarBorderWidth(Number barBorderWidth)
          Convenience method for setting the "barBorderWidth" option for the scrollbar.
 Scrollbar setBorderColor(String borderColor)
          Convenience method for setting the "borderColor" option for the scrollbar.
 Scrollbar setButtonArrowColor(String buttonArrowColor)
          Convenience method for setting the "buttonArrowColor" option for the scrollbar.
 Scrollbar setButtonBackgroundColor(String buttonBackgroundColor)
          Convenience method for setting the "buttonBackgroundColor" option for the scrollbar.
 Scrollbar setButtonBorderColor(String buttonBorderColor)
          Convenience method for setting the "buttonBorderColor" option for the scrollbar.
 Scrollbar setButtonBorderRadius(Number buttonBorderRadius)
          Convenience method for setting the "buttonBorderRadius" option for the scrollbar.
 Scrollbar setButtonBorderWidth(Number buttonBorderWidth)
          Convenience method for setting the "buttonBorderWidth" option for the scrollbar.
 Scrollbar setEnabled(boolean enabled)
          Convenience method for setting the "enabled" option for the scrollbar.
 Scrollbar setHeight(Number height)
          Convenience method for setting the "height" option for the scrollbar.
 Scrollbar setLiveRedraw(boolean liveRedraw)
          Convenience method for setting the "liveRedraw" option for the scrollbar.
 Scrollbar setMinWidth(Number minWidth)
          Convenience method for setting the "minWidth" option for the scrollbar.
 Scrollbar setRifleColor(String rifleColor)
          Convenience method for setting the "rifleColor" option for the scrollbar.
 Scrollbar setTrackBackgroundColor(String trackBackgroundColor)
          Convenience method for setting the "trackBackgroundColor" option for the scrollbar.
 Scrollbar setTrackBorderColor(String trackBorderColor)
          Convenience method for setting the "trackBorderColor" option for the scrollbar.
 Scrollbar setTrackBorderRadius(Number trackBorderRadius)
          Convenience method for setting the "trackBorderRadius" option for the scrollbar.
 Scrollbar setTrackBorderWidth(Number trackBorderWidth)
          Convenience method for setting the "trackBorderWidth" option for the scrollbar.
 
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

Scrollbar

public Scrollbar()
Method Detail

setBarBackgroundColor

public Scrollbar setBarBackgroundColor(String barBackgroundColor)
Convenience method for setting the "barBackgroundColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("barBackgroundColor", "#666" );
 
The background color of the scrollbar itself. Defaults to a gray gradient.

Parameters:
barBackgroundColor - The background color, as a string, of the scrollbar.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setBorderColor

public Scrollbar setBorderColor(String borderColor)
Convenience method for setting the "borderColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("borderColor", "#666");
 
The color of the bar's border. Defaults to #666.

Parameters:
borderColor - The color, as a string, of the bar's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setBarBorderRadius

public Scrollbar setBarBorderRadius(Number borderRadius)
Convenience method for setting the "borderRadius" option for the scrollbar. Equivalent to:

     scrollbar.setOption("borderRadius", 3);
 
The border rounding radius of the bar. Defaults to 2.

Parameters:
borderRadius - The length, in pixels, of the border's radius.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setBarBorderWidth

public Scrollbar setBarBorderWidth(Number barBorderWidth)
Convenience method for setting the "barBorderWidth" option for the scrollbar. Equivalent to:

     scrollbar.setOption("barBorderWidth", 2);
 
The width of the bar's border. Defaults to 1.

Parameters:
barBorderWidth - The width, in pixels, of the bar's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setButtonArrowColor

public Scrollbar setButtonArrowColor(String buttonArrowColor)
Convenience method for setting the "buttonArrowColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("buttonArrowColor", "#666");
 
The color of the small arrow inside the scrollbar buttons. Defaults to #666.

Parameters:
buttonArrowColor - The color, as a string, of the arrows in the scrollbar button.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setButtonBackgroundColor

public Scrollbar setButtonBackgroundColor(String buttonBackgroundColor)
Convenience method for setting the "buttonBackgroundColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("buttonBackgroundColor", "#666");
 
The color of scrollbar buttons. Defaults to a gray gradient.

Parameters:
buttonBackgroundColor - The color, as a string, of the scrollbar's button.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setButtonBorderColor

public Scrollbar setButtonBorderColor(String buttonBorderColor)
Convenience method for setting the "buttonBorderColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("buttonBorderColor", "#666");
 
The color of the border of the scrollbar buttons. Defaults to #666.

Parameters:
buttonBorderColor - The color, as a string, of the border of the scrollbar buttons.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setButtonBorderRadius

public Scrollbar setButtonBorderRadius(Number buttonBorderRadius)
Convenience method for setting the "buttonBorderRadius" option for the scrollbar. Equivalent to:

     scrollbar.setOption("buttonBorderRadius", 3);
 
The corner radius of the scrollbar buttons. Defaults to 2.

Parameters:
buttonBorderRadius - The radius, in pixels, of the scrollbar buttons.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setButtonBorderWidth

public Scrollbar setButtonBorderWidth(Number buttonBorderWidth)
Convenience method for setting the "buttonBorderWidth" option for the scrollbar. Equivalent to:

     scrollbar.setOption("buttonBorderWidth", 2);
 
The border width of the scrollbar buttons. Defaults to 1.

Parameters:
buttonBorderWidth - The width, in pixels, of the scrollbar button's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setEnabled

public Scrollbar setEnabled(boolean enabled)
Convenience method for setting the "enabled" option for the scrollbar. Equivalent to:

     scrollbar.setOption("enabled", false);
 
Enable or disable the scrollbar. Defaults to true.

Parameters:
enabled - False to disable the scrollbar.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setHeight

public Scrollbar setHeight(Number height)
Convenience method for setting the "height" option for the scrollbar. Equivalent to:

     scrollbar.setOption("height", 10);
 
The height of the scrollbar. The height also applies to the width of the scroll arrows so that they are always squares. Defaults to 20 for touch devices and 14 for mouse devices.

Parameters:
height - The height, in pixels, of the scrollbar.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setLiveRedraw

public Scrollbar setLiveRedraw(boolean liveRedraw)
Convenience method for setting the "liveRedraw" option for the scrollbar. Equivalent to:

     scrollbar.setOption("liveRedraw", false);
 
Whether to redraw the main chart as the scrollbar or the navigator zoomed window is moved. Defaults to true for modern browsers and false for legacy IE browsers.

Parameters:
liveRedraw - True to redraw the chart as the navigator is moved.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setMinWidth

public Scrollbar setMinWidth(Number minWidth)
Convenience method for setting the "minWidth" option for the scrollbar. Equivalent to:

     scrollbar.setOption("minWidth", 4);
 
The minimum width of the scrollbar. Defaults to 6.

Parameters:
minWidth - The minimum width, in pixels, of the scrollbar.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setRifleColor

public Scrollbar setRifleColor(String rifleColor)
Convenience method for setting the "rifleColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("rifleColor", "#666");
 
The color of the small rifles in the middle of the scrollbar. Defaults to #666.

Parameters:
rifleColor - The color, as a atring, of the rifles inside the scrollbar.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setTrackBackgroundColor

public Scrollbar setTrackBackgroundColor(String trackBackgroundColor)
Convenience method for setting the "trackBackgroundColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("trackBackgroundColor", "#666");
 
The color of the track background. The default is a gray gradient.

Parameters:
trackBackgroundColor - The color, as a string, of the track's background.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setTrackBorderColor

public Scrollbar setTrackBorderColor(String trackBorderColor)
Convenience method for setting the "trackBorderColor" option for the scrollbar. Equivalent to:

     scrollbar.setOption("trackBorderColor", "#666");
 
The color of the border of the scrollbar track.

Parameters:
trackBorderColor - The color, as a string, of the track's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setTrackBorderRadius

public Scrollbar setTrackBorderRadius(Number trackBorderRadius)
Convenience method for setting the "trackBorderRadius" option for the scrollbar. Equivalent to:

     scrollbar.setOption("trackBorderRadius", 1);
 
The corner radius of the border of the scrollbar track. Defaults to 0.

Parameters:
trackBorderRadius - The radius, in pixels, of the track's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.

setTrackBorderWidth

public Scrollbar setTrackBorderWidth(Number trackBorderWidth)
Convenience method for setting the "trackBorderWidth" option for the scrollbar. Equivalent to:

     scrollbar.setOption("trackBorderWidth", 2);
 
The width of the border of the scrollbar track. Defaults to 1.

Parameters:
trackBorderWidth - The width, in pixels, of the track's border.
Returns:
A reference to this Scrollbar instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.