Example usage for com.google.gwt.visualization.client.visualizations Toolbar Toolbar

List of usage examples for com.google.gwt.visualization.client.visualizations Toolbar Toolbar

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client.visualizations Toolbar Toolbar.

Prototype

public Toolbar() 

Source Link

Usage

From source file:com.google.gwt.visualization.sample.visualizationshowcase.client.ToolbarDemo.java

License:Apache License

public Widget getWidget() {
    Panel result = new VerticalPanel();
    PieDemo pieDemo = new PieDemo();
    Widget pieWidget = pieDemo.getWidget();
    result.add(pieWidget);/*  www  . j  a  v a2s .  c  o  m*/

    Toolbar toolbar = new Toolbar();

    Component component = Component.create();
    component.setType(Type.HTMLCODE);
    component.setDataSource(DATA_SOURCE);
    component.setGadget(GADGET);
    toolbar.addComponent(component);

    component = Component.create();
    component.setType(Type.CSV);
    component.setDataSource(DATA_SOURCE);
    component.setGadget(GADGET);
    toolbar.addComponent(component);

    component = Component.create();
    component.setType(Type.HTML);
    component.setDataSource(DATA_SOURCE);
    component.setGadget(GADGET);
    toolbar.addComponent(component);

    component = Component.create();
    component.setType(Type.IGOOGLE);
    component.setDataSource(DATA_SOURCE);
    component.setGadget(GADGET);
    toolbar.addComponent(component);

    result.add(toolbar);

    return result;
}