org.moxieapps.gwt.highcharts.client
Class Loading

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

public class Loading
extends Configurable<Loading>

A configurable class that can be used to represent custom loading options for the chart, which can then be set on the chart (via the BaseChart.setLoading(Loading) method.) The loading options control the appearance of the loading screen that covers the plot area on chart operations. This screen only appears after an explicit call to BaseChart.showLoading(String). It is a utility for developers to communicate to the end user that something is going on, for example while retrieving new data via GWT remoting requests. The "Loading..." text itself is not part of this configuration object, but part of the Lang object. Example usage:

   chart.setLoading(
     new Loading()
       .setShowDuration(500)
       .setStyle(
           new Style()
              .setColor("red")
              .setFontSize("16px")
       )
   );
 

Since:
1.0.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Constructor Summary
Loading()
           
 
Method Summary
 Loading setHideDuration(Number hideDuration)
          Convenience method for setting the 'hideDuration' option of the loading options.
 Loading setLabelStyle(Style labelStyle)
          Convenience method for setting the 'labelStyle' options of the loading options.
 Loading setShowDuration(Number showDuration)
          Convenience method for setting the 'showDuration' option of the loading options.
 Loading setStyle(Style style)
          Convenience method for setting the 'labelStyle' options of the loading options.
 
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

Loading

public Loading()
Method Detail

setHideDuration

public Loading setHideDuration(Number hideDuration)
Convenience method for setting the 'hideDuration' option of the loading options. Equivalent to:

     loading.setOption("hideDuration", 150);
 
The duration in milliseconds of the fade out effect. Defaults to 100.

Parameters:
hideDuration - The duration in milliseconds of the fade out effect.
Returns:
A reference to this Loading instance for convenient method chaining.

setLabelStyle

public Loading setLabelStyle(Style labelStyle)
Convenience method for setting the 'labelStyle' options of the loading options. Equivalent to:

     loading.setOption("labelStyle/fontSize", "16px");
     loading.setOption("labelStyle/color", "red");
 
CSS styles for the loading label span. Defaults to:

Parameters:
labelStyle - The CSS styles for the loading label span.
Returns:
A reference to this Loading instance for convenient method chaining.

setShowDuration

public Loading setShowDuration(Number showDuration)
Convenience method for setting the 'showDuration' option of the loading options. Equivalent to:

     loading.setOption("showDuration", 150);
 
The duration in milliseconds of the fade in effect. Defaults to 100.

Parameters:
showDuration - The duration in milliseconds of the fade in effect.
Returns:
A reference to this Loading instance for convenient method chaining.

setStyle

public Loading setStyle(Style style)
Convenience method for setting the 'labelStyle' options of the loading options. Equivalent to:

     loading.setOption("style/backgroundColor", "red");
     loading.setOption("style/opacity", "0.8
 
CSS styles for the loading screen that covers the plot area. Defaults to:

Parameters:
style - The CSS styles for the loading screen that covers the plot area.
Returns:
A reference to this Loading instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.