List of usage examples for com.google.gwt.event.shared HandlerManager HandlerManager
public HandlerManager(Object source)
From source file:com.square.composant.espace.client.square.client.ComposantEspaceClientModule.java
License:Open Source License
/** * {@inheritDoc}//w w w .j av a2 s . c o m */ @Override public void onModuleLoad() { firefox3compatibility(); StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final VerticalPanel conteneur = new VerticalPanel(); conteneur.setWidth("944px"); // final Long idPersonne = 51013355L; final Long idPersonne = 500629L; final HandlerManager eventBus = new HandlerManager(null); final EspaceClientView view = new EspaceClientViewImpl(); final EspaceClientPresenter espaceClientPresenter = new EspaceClientPresenter(eventBus, view, idPersonne); espaceClientPresenter.showPresenter(conteneur); RootPanel.get().add(conteneur); }
From source file:com.square.composant.flux.opportunite.client.ComposantFluxOpportuniteModule.java
License:Open Source License
/** * {@inheritDoc}//from w w w .j a va 2 s. c o m */ public void onModuleLoad() { firefox3compatibility(); StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final VerticalPanel conteneur = new VerticalPanel(); conteneur.setWidth("944px"); conteneur.setSpacing(10); final Long uidRessource = 3L; final HandlerManager eventBus = new HandlerManager(null); // Panel des quotas final PanelQuotasView panelQuotaView = new PanelQuotasViewImpl(); final PanelQuotasPresenter panelQuotasPresenter = new PanelQuotasPresenter(eventBus, panelQuotaView, uidRessource); panelQuotasPresenter.showPresenter(conteneur); // Bouton pour ouvrir la popup de modification des quotas final DecoratedButton btnPopup = new DecoratedButton("Modifier quotas"); btnPopup.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { final PopupModifQuotasView popupView = new PopupModifQuotasViewImpl(); final List<Long> listeIdsRessources = new ArrayList<Long>(); listeIdsRessources.add(3L); final PopupModifQuotasPresenter popupPresenter = new PopupModifQuotasPresenter(eventBus, popupView, listeIdsRessources); popupPresenter.showPresenter(null); } }); conteneur.add(btnPopup); RootPanel.get().add(conteneur); }
From source file:com.square.composant.fusion.square.client.ComposantFusionModule.java
License:Open Source License
/** * {@inheritDoc}/* w ww. j av a 2 s . c o m*/ */ public void onModuleLoad() { firefox3compatibility(); StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final HandlerManager eventBus = new HandlerManager(null); final RechercheDoublonCritereModel criteres = new RechercheDoublonCritereModel(); criteres.setNom("demars"); criteres.setPrenom("christelle"); criteres.setDateNaissance("14/05/1977"); final ComposantFusionPresenter composantFusionPresenter = new ComposantFusionPresenter(eventBus, criteres, null); composantFusionPresenter.showPresenter(RootPanel.get()); }
From source file:com.square.composant.fusion.square.client.view.selection.doublon.SelectionDoublonViewImpl.java
License:Open Source License
/** Construit le tableau de slection de doublons. */ private void construireTableauSelectionDoublon() { remotePagingTableDoublons = new RemotePagingTable<RechercheDoublonResultatModel, RechercheDoublonCritereModel>( SelectionDoublonViewImplConstants.NB_ELEMENT_PAR_PAGE, true) { @Override//from w ww. jav a2 s. c o m public void setDataProvider(RemotePagingCriteriasGwt<RechercheDoublonCritereModel> params, AsyncCallback<RemotePagingResultsGwt<RechercheDoublonResultatModel>> callback) { remotePagingHandlerManager.fireEvent( new SetDataProviderEvent<RechercheDoublonCritereModel, RechercheDoublonResultatModel>( params, callback)); } @Override public int setDefaultSortAsc() { return RemotePagingSortGwt.REMOTE_PAGING_SORT_ASC; } @Override public String setDefaultSortField() { return constantes.getProprietePersonneNom(); } @Override public Column[] setHeader() { return new Column[] { new Column(viewConstants.headerNumClient(), constantes.getProprietePersonneNumeroClient()), new Column(viewConstants.headerDateCreation(), constantes.getProprietePersonneDateCreation()), new Column(viewConstants.headerNom(), constantes.getProprietePersonneNom()), new Column(viewConstants.headerPrenom(), constantes.getProprietePersonnePrenom()), new Column(viewConstants.headerDateNaissance(), constantes.getProprietePersonneDateNaissance()), new Column(viewConstants.headerNature(), constantes.getProprietePersonneNature()), new Column(viewConstants.headerCodePostal(), constantes.getProprietePersonneCodePostal()), new Column(viewConstants.headerCommune(), constantes.getProprietePersonneCommune()), new Column(viewConstants.headerSelectionne()) }; } @Override public void setRow(int row, final RechercheDoublonResultatModel doublon) { setWidget(row, 0, new Label(doublon.getNumeroClient())); setWidget(row, 1, new Label(doublon.getDateCreation())); setWidget(row, 2, new Label(doublon.getNom())); setWidget(row, 3, new Label(doublon.getPrenom())); setWidget(row, 4, new Label(doublon.getDateNaissance())); setWidget(row, 5, new Label(doublon.getNature())); setWidget(row, 6, new Label(doublon.getCodePostal())); setWidget(row, 7, new Label(doublon.getCommune())); final CheckBox cb = new CheckBox(); cb.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (cb.getValue()) { mapCBSelectionnees.put(doublon.getId(), cb); } else { mapCBSelectionnees.remove(doublon.getId()); } // Mise jour de l'autorisation sur les CheckBoxs majCBTableau(); // Mise jour de l'tat des boutons mAJEtatsBtnsSelection(); } }); if (doublon.getId().equals(idPersonneSelectionnee)) { // On pr-selectionne la ligne correspondant l'identifiant de la personne spficie cb.setValue(true); mapCBSelectionnees.put(doublon.getId(), cb); } setWidget(row, 8, cb); getFlexCellFormatter().setHorizontalAlignment(row, 8, HasAlignment.ALIGN_CENTER); } @Override public void setCellClicked(RechercheDoublonResultatModel doublon) { } }; remotePagingHandlerManager = new HandlerManager(remotePagingTableDoublons); remotePagingTableDoublons.setWidth(ComposantFusionPresenterConstants.POURCENT_100); conteneur.add(remotePagingTableDoublons); }
From source file:com.square.composant.ged.square.client.ClientEntryPointGwt.java
License:Open Source License
/** * {@inheritDoc}//from w w w. j a va 2 s .c o m */ public void onModuleLoad() { StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final VerticalPanel conteneur = new VerticalPanel(); conteneur.setWidth("944px"); final DocumentsServiceGwtAsync documentRpcService = (DocumentsServiceGwtAsync) GWT .create(DocumentsServiceGwt.class); final HandlerManager eventBus = new HandlerManager(null); // new AjoutDocumentPresenter(eventBus, "2239978", 6L, new AjoutDocumentViewImpl(), documentRpcService).showPresenter(conteneur); // new ListeDetailleeDocumentsPresenter(eventBus, "1015036", new ListeDetailleeDocumentsViewImpl(), documentRpcService).showPresenter(conteneur); new ListeCompacteDocumentsPresenter(eventBus, 6L, "2239978", new ListeCompacteDocumentsViewImpl(), documentRpcService).showPresenter(conteneur); //new AjoutDocumentPresenter(eventBus, "2239978", NUM_CLIENT, new AjoutDocumentViewImpl(), documentRpcService).showPresenter(conteneur); RootPanel.get().add(conteneur); }
From source file:com.square.composant.prestations.square.client.ComposantPrestationsModule.java
License:Open Source License
/** * {@inheritDoc}/*from w w w. j a v a2 s. c o m*/ */ @Override public void onModuleLoad() { firefox3compatibility(); StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final HandlerManager eventBus = new HandlerManager(this); final Long uidPersonne = 238607L; final VerticalPanel conteneur = new VerticalPanel(); conteneur.setWidth("944px"); final ComposantPrestations composantPrestations = new ComposantPrestations(eventBus, new ComposantPrestationsViewImpl(), uidPersonne); composantPrestations.showPresenter(conteneur); RootPanel.get().add(conteneur); }
From source file:com.square.composant.tarificateur.square.client.ComposantTarificateurModule.java
License:Open Source License
/** * {@inheritDoc}//w w w. j av a2s . c o m */ public void onModuleLoad() { final ComposantTarificateurConstants constants = GWT.create(ComposantTarificateurConstants.class); firefox3compatibility(); StyleInjector.inject(SquareLibResources.INSTANCE.css().getText()); final PersonneModel personne = getPersonneTest(); final Long eidOpportunite = 112624460L;// 125350001L; final Long eidCreateur = 4L; final Long eidAgence = 4L; final Long eidResponsable = 58L; final InfosOpportuniteModel infosOpportunite = new InfosOpportuniteModel(); infosOpportunite.setEidOpportunite(eidOpportunite); infosOpportunite.setEidCreateur(eidCreateur); infosOpportunite.setEidAgence(eidAgence); infosOpportunite.setEidResponsable(eidResponsable); infosOpportunite.setLoginUtilisateurConnecte("ymurg"); infosOpportunite.setPersonne(personne); final HandlerManager eventBus = new HandlerManager(null); eventBus.addHandler(MiseAJourOpportuniteEvent.TYPE, new MiseAJourOpportuniteEventHandler() { @Override public void mettreAJour(MiseAJourOpportuniteEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration(constants.miseAJourHoportunite(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); new DecoratedInfoPopup(config).show(); } }); eventBus.addHandler(SuccesImpressionEvent.TYPE, new SuccesImpressionEventHandler() { @Override public void onSuccess(SuccesImpressionEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration(constants.succesImpression(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); config.setCallback(new PopupCallback() { @Override public void onResult(boolean result) { // poste un evenement pour recharger l'opp eventBus.fireEvent(new RechargementOpportuniteEvent()); } }); new DecoratedInfoPopup(config).show(); } }); eventBus.addHandler(SuccesMajInfosAdhesionEvent.TYPE, new SuccesMajInfosAdhesionEventHandler() { @Override public void onSuccess(SuccesMajInfosAdhesionEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration( constants.succesMiseJourInfoAdhesion(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); new DecoratedInfoPopup(config).show(); } }); eventBus.addHandler(SuccesTransformationAiaEvent.TYPE, new SuccesTransformationAiaEventHandler() { @Override public void onSuccess(SuccesTransformationAiaEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration( constants.succesTransformationAia(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); new DecoratedInfoPopup(config).show(); } }); eventBus.addHandler(SuccesTransfertEvent.TYPE, new SuccesTransfertEventHandler() { @Override public void onSuccess(SuccesTransfertEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration(constants.succesTransfert(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); new DecoratedInfoPopup(config).show(); } }); final DeskBar deskBar = new DeskBar(0, eventBus); final ComposantTarificateur composantTarificateur = new ComposantTarificateur(eventBus, deskBar, infosOpportunite, true, true); composantTarificateur.getBtnAjouterDevisClickHandler().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { composantTarificateur.creerNouveauDevis(infosOpportunite); } }); composantTarificateur.getBtnVoirActionsClickHandler().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { final PopupInfoConfiguration config = new PopupInfoConfiguration(constants.affichageActions(), ComposantTarificateurConstants.NOTIFICATION_TIME_OUT); new DecoratedInfoPopup(config).show(); } }); final VerticalPanel conteneurTarificateur = new VerticalPanel(); conteneurTarificateur.setWidth("944px"); composantTarificateur.showPresenter(conteneurTarificateur); final VerticalPanel conteneur = new VerticalPanel(); conteneur.setWidth("100%"); conteneur.add(conteneurTarificateur); conteneur.add(deskBar); RootPanel.get().add(conteneur); }
From source file:com.square.composant.tarificateur.square.client.ui.popup.choix.PopupChoixProduit.java
License:Open Source License
/** * Constructeur.// w ww .j a va2s. co m * @param eventBus eventBus * @param constantesMapping constantes de mapping ncessaires au composant. * @param tarificateurService tarificateurService * @param produitService produitService */ public PopupChoixProduit(final HandlerManager eventBus, ConstantesModel constantesMapping, TarificateurServiceGwtAsync tarificateurService, ProduitServiceGwtAsync produitService) { super(ComposantTarificateur.CONSTANTS.titrePopupChoixProduit(), false, true, true); this.addStyleName(ComposantTarificateur.RESOURCES.css().choixProduit()); // Create the page constants pageConstants = (PageConstants) GWT.create(PageConstants.class); // Create the page messages pageMessages = (PageMessages) GWT.create(PageMessages.class); this.constantesMapping = constantesMapping; this.produitService = produitService; this.tarificateurService = tarificateurService; this.eventBus = eventBus; this.eventBusLocal = new HandlerManager(this); // Initialisation des composants creerSuggestListBox(); initComposants(); }
From source file:com.square.composant.tarificateur.square.client.ui.popup.selection.PopupSelectionProduits.java
License:Open Source License
/** * Constructeur.//from w w w . j a v a 2 s . co m * @param eventBus le bus d'evenement * @param constantesMapping constantes de mapping ncessaires au composant. * @param selecteurProduitService selecteurProduitService * @param infosOpportunite infosOpportunite * @param deskBar deskBar */ public PopupSelectionProduits(final HandlerManager eventBus, ConstantesModel constantesMapping, SelecteurProduitServiceGwtAsync selecteurProduitService, InfosOpportuniteModel infosOpportunite, DeskBar deskBar) { super(ComposantTarificateur.CONSTANTS.titrePopupSelectionProduit(), false, true, true); iconeErreurChampManager = new IconeErreurChampManager(); // Create the page constants pageConstants = (PageConstants) GWT.create(PageConstants.class); // Create the page messages pageMessages = (PageMessages) GWT.create(PageMessages.class); this.constantComposantTarificateur = GWT.create(ComposantTarificateurConstants.class); this.addStyleName(ComposantTarificateur.RESOURCES.css().selectionProduits()); this.constantesMapping = constantesMapping; this.infosOpportunite = infosOpportunite; this.selecteurProduitService = selecteurProduitService; this.eventBus = eventBus; eventBusLocal = new HandlerManager(this); this.deskBar = deskBar; }
From source file:com.tractionsoftware.gwt.user.client.ui.impl.UTCDateBoxImplHtml4.java
License:Apache License
public UTCDateBoxImplHtml4() { handlerManager = new HandlerManager(this); datebox = new DateBox(); datebox.addValueChangeHandler(new ValueChangeHandler<Date>() { @Override/*from w w w .j av a 2 s . c o m*/ public void onValueChange(ValueChangeEvent<Date> event) { // pass this event onto our handlers after converting // the value fireValueChangeEvent(UTCDateBox.date2utc(event.getValue())); } }); }