List of usage examples for com.google.gwt.visualization.client Query create
public static final native Query create(String dataSource) ;
From source file:com.google.gwt.visualization.sample.visualizationshowcase.client.TableDemo.java
License:Apache License
public TableDemo() { // Read data from spreadsheet String dataUrl = "http://spreadsheets.google.com/tq?key=prll1aQH05yQqp_DKPP9TNg&pub=1"; Query query = Query.create(dataUrl); query.send(new Callback() { public void onResponse(QueryResponse response) { if (response.isError()) { Window.alert("Error in query: " + response.getMessage() + ' ' + response.getDetailedMessage()); return; }//w ww.j av a 2 s .c o m Table viz = new Table(); Table.Options options = Table.Options.create(); options.setShowRowNumber(true); viz.draw(response.getDataTable(), options); Label status = new Label(); viz.addSelectHandler(new SelectionDemo(viz, status)); panel.add(viz); panel.add(status); } }); }