List of usage examples for com.google.gwt.visualization.client.visualizations OrgChart PACKAGE
String PACKAGE
To view the source code for com.google.gwt.visualization.client.visualizations OrgChart 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);/*w w w .j a v a 2s . 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.square.client.gwt.client.presenter.personne.PersonneRelationsModePresenter.java
License:Open Source License
@Override public void onBind() { view.getBtAjouterRelationGenerale().addClickHandler(new ClickHandler() { @Override//from w w w. ja v a2s . com public void onClick(ClickEvent event) { if (idNaturePersonne != null && (constantes.getIdNaturePersonneVivier().equals(idNaturePersonne) || constantes.getIdNaturePersonneBeneficiaireVivier().equals(idNaturePersonne))) { view.afficherPopupErreur( new ErrorPopupConfiguration(presenterConstants.ajoutRelationVivierImpossible())); } else { if (filtreGroupements != null) { if (personneRelationsFamillePopupPresenter == null) { personneRelationsFamillePopupPresenter = addChildPresenter( new PersonneRelationsPopupPresenter(eventBus, personneRpcService, personnePhysiqueRpcService, personneMoraleRpcService, dimensionRpcService, new PersonneRelationPopupViewImpl(constantes.isHasRoleAdmin()), constantes, idPersonne, nomPersonne, filtreGroupements, filtrePasDansGroupements, typePersonneSource, deskBar, aideService)); personneRelationsFamillePopupPresenter.addEventHandlerToLocalBus( SimpleValueChangeEvent.TYPE, new SimpleValueChangeEventHandler<String>() { @Override public void onValueChange(SimpleValueChangeEvent<String> event) { switchModeEdition(modeCourant); } }); personneRelationsFamillePopupPresenter.showPresenter(null); } else { personneRelationsFamillePopupPresenter.afficherPopupAjoutRelation(); } } if (filtrePasDansGroupements != null) { if (personneRelationsPopupPresenter == null) { personneRelationsPopupPresenter = addChildPresenter(new PersonneRelationsPopupPresenter( eventBus, personneRpcService, personnePhysiqueRpcService, personneMoraleRpcService, dimensionRpcService, new PersonneRelationPopupViewImpl(constantes.isHasRoleAdmin()), constantes, idPersonne, nomPersonne, filtreGroupements, filtrePasDansGroupements, typePersonneSource, deskBar, aideService)); personneRelationsPopupPresenter.addEventHandlerToLocalBus(SimpleValueChangeEvent.TYPE, new SimpleValueChangeEventHandler<String>() { @Override public void onValueChange(SimpleValueChangeEvent<String> event) { switchModeEdition(modeCourant); } }); personneRelationsPopupPresenter.showPresenter(null); } else { personneRelationsPopupPresenter.afficherPopupAjoutRelation(); } } } } }); view.getBtEnregistrerRelationGenerale().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (personneRelationsPresenter.isDatesValides()) { personneRelationsPresenter.modifierRelations(); } } }); view.btChangementDeMode().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (modeCourant == AppControllerConstants.MODE_RELATION_EDITION) { switchModeEdition(AppControllerConstants.MODE_RELATION_GRAPHIQUE); } else { switchModeEdition(AppControllerConstants.MODE_RELATION_EDITION); } } }); // Tentative de connexion a internet pour dterminer si la visualisation est disponible. view.afficherChangementMode(false); final RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, "http://www.google.fr"); rb.setHeader("Access-Control-Allow-Origin", "http://www.google.fr"); final int timeout = 15000; rb.setTimeoutMillis(timeout); rb.setCallback(new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { if (response != null) { final Runnable onLoadCallback = new Runnable() { public void run() { view.afficherChangementMode(true); } }; VisualizationUtils.loadVisualizationApi(onLoadCallback, OrgChart.PACKAGE); } } @Override public void onError(Request request, Throwable exception) { } }); try { rb.send(); } catch (RequestException e) { GWT.log("", e); } }
From source file:com.square.composant.contrat.square.client.presenter.ContratsPresenter.java
License:Open Source License
/** * Charge l'API graphique puis les graphiques si la connexion Internet existe. * @param infosContrats les infos de contrat *///from www. j a v a2s . c om private void chargerApiVisualisation(final InfosContratsModel infosContrats) { currentInfosContrats = infosContrats; // Tentative de connexion a internet pour dterminer si la visualisation est disponible. final RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, "http://www.google.fr"); rb.setHeader("Access-Control-Allow-Origin", "http://www.google.fr"); final int timeout = 15000; rb.setTimeoutMillis(timeout); rb.setCallback(new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { if (response != null) { final Runnable onLoadCallback = new Runnable() { public void run() { // Chargement des graphiques chargerGraphiques(); } }; VisualizationUtils.loadVisualizationApi(onLoadCallback, OrgChart.PACKAGE); } } @Override public void onError(Request request, Throwable exception) { } }); try { rb.send(); } catch (RequestException e) { GWT.log("", e); } }