List of usage examples for com.google.gwt.visualization.client.visualizations Gauge PACKAGE
String PACKAGE
To view the source code for com.google.gwt.visualization.client.visualizations Gauge PACKAGE.
Click Source Link
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 va 2 s . c o m 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.speedtracer.latencydashboard.client.MarkTimelineLatencyDashboard.java
License:Apache License
private void createDashboardUi() { refreshButton.getElement().getStyle().setMarginLeft(3, Unit.EM); refreshButton.setEnabled(false);/*from www . j a va 2 s . com*/ refreshButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { populateDashboard(); } }); VisualizationUtils.loadVisualizationApi(new Runnable() { /** * Load data from the server. */ public void run() { refreshButton.setEnabled(true); createCharts(); populateDashboard(); RootPanel.get().add(refreshButton); Window.addResizeHandler(new ResizeHandler() { public void onResize(ResizeEvent event) { populateDashboard(); } }); } }, AreaChart.PACKAGE, LineChart.PACKAGE, PieChart.PACKAGE, Gauge.PACKAGE); }
From source file:de.uni_koeln.spinfo.maalr.webapp.ui.admin.client.general.DbManager.java
License:Apache License
private void initVisualization() { service.getSystemSummary(new AsyncCallback<SystemSummary>() { @Override/*w w w. ja v a 2s .co m*/ public void onFailure(Throwable caught) { hideSystemSummary(); } @Override public void onSuccess(SystemSummary result) { if (result == null) { hideSystemSummary(); } else { // Create a callback to be called when the visualization API // has been loaded. Runnable onLoadCallback = new Runnable() { public void run() { initializeCharts(); } }; // Load the visualization api, passing the onLoadCallback to be called // when loading is done. VisualizationUtils.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE, Gauge.PACKAGE, BarChart.PACKAGE); } } private void hideSystemSummary() { chartsColumn.setVisible(false); settingsColumn.setSize(12); } }); }