com.google.gwt.visualization.client.visualizations
Class Visualization<OptionsType extends AbstractDrawOptions>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.visualization.client.visualizations.Visualization<OptionsType>
Type Parameters:
OptionsType - The options for drawing this visualization.
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
AnnotatedTimeLine, AreaChart, BarChart, ColumnChart, CoreChart, Gauge, GeoMap, ImageAreaChart, ImageBarChart, ImageChart, ImageLineChart, ImagePieChart, ImageSparklineChart, IntensityMap, LineChart, MapVisualization, MotionChart, OrgChart, PieChart, ScatterChart, Table

public abstract class Visualization<OptionsType extends AbstractDrawOptions>
extends com.google.gwt.user.client.ui.Widget

A Visualization object can draw a DataTable.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Visualization()
           
Visualization(AbstractDataTable data, OptionsType options)
           
 
Method Summary
static com.google.gwt.dom.client.Element createDiv(int width, int height)
          Create a div with the given width and height.
protected abstract  com.google.gwt.core.client.JavaScriptObject createJso(com.google.gwt.dom.client.Element div)
          Creates an instance of the underlying JavaScriptObject for this visualization.
 void draw(AbstractDataTable data)
          Draws the visualization.
 void draw(AbstractDataTable data, OptionsType options)
          Draws the visualization.
 com.google.gwt.core.client.JavaScriptObject getJso()
          Note: calling this method should not usually be necessary except by subclasses.
protected  void onLoad()
           
static void setSize(com.google.gwt.dom.client.Element div, int width, int height)
          Set the size of a div element by setting the style attribute.
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Visualization

public Visualization()

Visualization

public Visualization(AbstractDataTable data,
                     OptionsType options)
Method Detail

createDiv

public static com.google.gwt.dom.client.Element createDiv(int width,
                                                          int height)
Create a div with the given width and height.

Parameters:
width - The desired width.
height - The desired height.
Returns:
An HTML
Element.

setSize

public static void setSize(com.google.gwt.dom.client.Element div,
                           int width,
                           int height)
Set the size of a div element by setting the style attribute.

Parameters:
div - An HTML
Element.
width - The desired width.
height - The desierd height.

draw

public final void draw(AbstractDataTable data)
Draws the visualization.

Parameters:
data - The DataTable with the data.

draw

public final void draw(AbstractDataTable data,
                       OptionsType options)
Draws the visualization.

Parameters:
data - The DataTable with the data.
options - The options for drawing this visualization.

getJso

public com.google.gwt.core.client.JavaScriptObject getJso()
Note: calling this method should not usually be necessary except by subclasses. If you need to call it, make sure you know what you're doing.

Returns:
The underlying JavaScriptObject representing the JavaScript implementation of the visualization.

createJso

protected abstract com.google.gwt.core.client.JavaScriptObject createJso(com.google.gwt.dom.client.Element div)
Creates an instance of the underlying JavaScriptObject for this visualization. Subclasses must override this with JSNI that calls the JavaScript constructor for their visualization.

Parameters:
div - The container for the visualization.
Returns:
The underlying JavaScriptObject for the visualization.

onLoad

protected void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget