List of usage examples for com.google.gwt.visualization.client.visualizations Table PACKAGE
String PACKAGE
To view the source code for com.google.gwt.visualization.client.visualizations Table PACKAGE.
Click Source Link
From source file:com.google.gwt.visualization.sample.hellovisualization.client.VisualizationDemo.java
License:Apache License
public void onModuleLoad() { VisualizationUtils.loadVisualizationApi(new Runnable() { public void run() { final VerticalPanel vp = new VerticalPanel(); vp.getElement().getStyle().setPropertyPx("margin", 15); RootPanel.get().add(vp);/*from ww w . ja v a 2s. c o m*/ vp.add(new Label("Google Visualization with GWT demo.")); vp.add(tabPanel); tabPanel.setWidth("800"); tabPanel.setHeight("600"); tabPanel.add(createPieChart(), "Pie Chart"); tabPanel.add(createTable(), "Table"); tabPanel.add(createDataView(), "DataView"); tabPanel.selectTab(0); } }, PieChart.PACKAGE, Table.PACKAGE); }
From source file:com.google.gwt.visualization.sample.visualizationshowcase.client.Showcase.java
License:Apache License
public void onModuleLoad() { VisualizationUtils.loadVisualizationApi(new Runnable() { public void run() { final VerticalPanel vp = new VerticalPanel(); vp.setSpacing(15);//from ww w . j a v a 2 s . com RootPanel.get().add(vp); vp.add(new HTML("The following visualizations are included in the GWT " + "Visualization API in the package " + "<tt>com.google.gwt.visualization.client.visualizations</tt>. " + "For a full listing of visualizations available in GWT, see <a href=" + '"' + "http://code.google.com/apis/visualization/documentation/gallery.html" + '"' + ">the Google Visualization API</a>.")); LeftTabPanel tabby = new LeftTabPanel(); vp.add(tabby); AnnotatedDemo annotatedWidget = new AnnotatedDemo(); tabby.add(annotatedWidget, "AnnotatedTimeLine"); tabby.add(new AreaDemo(), "AreaChart"); tabby.add(new ImageAreaDemo(), "AreaChart (Image)"); tabby.add(new BarDemo(), "BarChart"); tabby.add(new ImageBarDemo(), "BarChart (Image)"); tabby.add(new ColumnDemo(), "ColumnChart"); tabby.add(new GaugeDemo(), "Gauge"); tabby.add(new GeoDemo(), "GeoMap"); tabby.add(new IntensityDemo(), "IntensityMap"); tabby.add(new LineDemo(), "LineChart"); tabby.add(new ImageLineDemo(), "LineChart (Image)"); tabby.add(new MapDemo(), "Map"); tabby.add(new MoneyDemo(), "MoneyChart"); tabby.add(new MotionDemo(), "MotionChart"); tabby.add(new OrgDemo(), "OrgChart"); tabby.add(new PieDemo(), "PieChart"); tabby.add(new ImagePieDemo(), "PieChart (Image)"); tabby.add(new ImageDemo(), "RadarChart (Image)"); tabby.add(new ScatterDemo(), "ScatterChart"); tabby.add(new SparklineDemo(), "Sparkline (Image)"); tabby.add(new TableDemo(), "Table"); tabby.add(new ToolbarDemo(), "Toolbar"); tabby.setWidget(annotatedWidget); } }, AnnotatedTimeLine.PACKAGE, CoreChart.PACKAGE, Gauge.PACKAGE, GeoMap.PACKAGE, ImageChart.PACKAGE, ImageLineChart.PACKAGE, ImageAreaChart.PACKAGE, ImageBarChart.PACKAGE, ImagePieChart.PACKAGE, IntensityMap.PACKAGE, MapVisualization.PACKAGE, MotionChart.PACKAGE, OrgChart.PACKAGE, Table.PACKAGE, ImageSparklineChart.PACKAGE); }
From source file:com.google.sampling.experiential.client.PacoEventServer.java
License:Open Source License
private void createCallbackForGviz() { // Create a callback to be called when the visualization API // has been loaded. Runnable onLoadCallback = new Runnable() { public void run() { }/* ww w .j ava 2s .co m*/ }; // Load the visualization api, passing the onLoadCallback to be called // when loading is done. VisualizationUtils.loadVisualizationApi(onLoadCallback, ColumnChart.PACKAGE, Table.PACKAGE, LineChart.PACKAGE, ScatterChart.PACKAGE); }
From source file:com.radoslavhusar.tapas.war.client.app.VisualizationDemo.java
License:Apache License
public void onModuleLoad() { VisualizationUtils.loadVisualizationApi(new Runnable() { public void run() { final VerticalPanel vp = new VerticalPanel(); vp.getElement().getStyle().setPropertyPx("margin", 15); RootPanel.get().add(vp);/* w w w. j av a2 s . c o m*/ vp.add(new Label("Google Visualization with GWT demo.")); vp.add(tabPanel); tabPanel.setWidth("800"); tabPanel.setHeight("600"); tabPanel.add(createPieChart(), "Pie Chart"); tabPanel.add(createTable(), "Table"); tabPanel.add(createDataView(), "DataView"); tabPanel.selectTab(0); } }, PieChart.PACKAGE, Table.PACKAGE); }
From source file:edu.cudenver.bios.glimmpse.client.Glimmpse.java
License:Open Source License
public void onModuleLoad() { // Load the visualization api, passing the onLoadCallback to be called // when loading is done. VisualizationUtils.loadVisualizationApi(onLoadCallback, Table.PACKAGE); }
From source file:org.opendatakit.aggregate.client.popups.VisualizationPopup.java
License:Apache License
public VisualizationPopup(FilterSubTab filterSubTab) { super();//w w w.ja va2 s . c o m formId = filterSubTab.getDisplayedFilterGroup().getFormId(); headers = filterSubTab.getSubmissionTable().getHeaders(); submissions = filterSubTab.getSubmissionTable().getSubmissions(); chartType = new EnumListBox<ChartType>(ChartType.values(), VIZ_TYPE_TOOLTIP, VIZ_TYPE_BALLOON); chartType.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { updateUIoptions(); } }); columnList = new ColumnListBox(headers, false, true, "Column to Graph", "Select the column you wish to graph."); columnList.addChangeHandler(new ColumnChangeHandler()); dataList = new ColumnListBox(headers, false, true, "Column to get data values from", "Select the column to get the numerical values from."); dataList.addChangeHandler(new ColumnChangeHandler()); geoPoints = new KmlSettingListBox(GEOPOINT_TOOLTIP, GEOPOINT_BALLOON); // The Maps API is always loaded. chartApiLoaded = false; VisualizationUtils.loadVisualizationApi(new Runnable() { public void run() { chartApiLoaded = true; updateUIoptions(); } }, PieChart.PACKAGE, Table.PACKAGE); SecureGWT.getFormService().getGpsCoordnates(formId, new AsyncCallback<KmlSettings>() { public void onFailure(Throwable caught) { AggregateUI.getUI().reportError(caught); } public void onSuccess(KmlSettings result) { geoPoints.updateValues(result.getGeopointNodes()); } }); // create radio button // NOTE: need to apply the click handler to both because can't use value // change. Because browser limitations prevent ValueChangeEvents from being // sent when the radio button is cleared as a side effect of another in the // group being clicked. FlexTable tallyTable = new FlexTable(); tallyOccurRadio = new RadioButton(RADIO_GROUP, BasicConsts.EMPTY_STRING); tallyOccurRadio.addClickHandler(new RadioChangeClickHandler()); tallyOccurRadio.setValue(true); tallyTable.setWidget(0, TALLY_CHOICE, tallyOccurRadio); FlexTable sumTable = new FlexTable(); sumColumnsRadio = new RadioButton(RADIO_GROUP, SUM_COLUMNS_TXT); sumColumnsRadio.addClickHandler(new RadioChangeClickHandler()); sumRadioTxt = new Label(BasicConsts.EMPTY_STRING); sumTable.setWidget(1, SUM_CHOICE, sumColumnsRadio); sumTable.setWidget(1, SUM_CHOICE_COLUMN, dataList); sumTable.setWidget(1, SUM_CHOICE_TXT, sumRadioTxt); executeButton = new AggregateButton(BasicConsts.EMPTY_STRING, "Execute the Vizualization", "Create the selected Vizualization."); executeButton.addClickHandler(new ExecuteVisualization()); typeControlBar = new FlexTable(); typeControlBar.setHTML(0, VIZ_TYPE_TEXT, TYPE_TXT); typeControlBar.setWidget(0, VIZ_TYPE_LIST, chartType); typeControlBar.setHTML(0, COLUMN_TEXT, COLUMN_TXT); typeControlBar.setWidget(0, COLUMN_LIST, columnList); typeControlBar.setWidget(0, BUTTON, executeButton); FlexTable topSelectionRow = new FlexTable(); topSelectionRow.addStyleName("stretch_popup_header"); topSelectionRow.setWidget(0, 0, typeControlBar); topSelectionRow.setWidget(0, CLOSE, new ClosePopupButton(this)); topSelectionRow.getCellFormatter().addStyleName(0, CLOSE, "popup_close_cell"); FlexTable tabulationBar = new FlexTable(); tabulationBar.setHTML(0, VALUE_TEXT, TABULATION_TXT); tabulationBar.setWidget(0, VALUE_LIST, tallyTable); tabulationBar.setWidget(1, VALUE_LIST, sumTable); FlexTable bottomSelectionRow = new FlexTable(); bottomSelectionRow.addStyleName("stretch_popup_header"); bottomSelectionRow.setWidget(0, 0, tabulationBar); // setup the window size chartPanel = new SimplePanel(); Integer height = (Window.getClientHeight() * 5) / 6; Integer width = (Window.getClientWidth() * 5) / 6; chartPanel.setHeight(height.toString() + RESIZE_UNITS); chartPanel.setWidth(width.toString() + RESIZE_UNITS); FlowPanel layoutPanel = new FlowPanel(); layoutPanel.add(topSelectionRow); layoutPanel.add(bottomSelectionRow); layoutPanel.add(chartPanel); setWidget(layoutPanel); chartType.setItemSelected(0, true); updateUIoptions(); updateColumnGraphingDesc(); }