List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment
public void setCellVerticalAlignment(IsWidget w, VerticalAlignmentConstant align)
From source file:com.square.client.gwt.client.view.personne.action.PersonneActionContenuViewImpl.java
License:Open Source License
private void constructionNotification() { final CaptionPanel captionNotification = new CaptionPanel(constants.titreNotification()); final VerticalPanel verticalPanelNotificationContenu = new VerticalPanel(); // Horizontal panel partie notification rappel final HorizontalPanel horizontalPanelRappel = new HorizontalPanel(); cbRappel = new CheckBox(); cbRappel.ensureDebugId(viewDebudIdConstants.debugIdCbRappel()); aidecbRappel = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_RAPPEL, isAdmin); ajouterAideComposant(aidecbRappel);/*from w w w.j a va 2s . c om*/ lbNotification = new ListBox(); lbNotification.ensureDebugId(viewDebudIdConstants.debugIdLbNotification()); horizontalPanelRappel.add(aidecbRappel); horizontalPanelRappel.add(cbRappel); final Label libelleRappel = new Label(constants.libelleRappel()); horizontalPanelRappel.add(libelleRappel); horizontalPanelRappel.setCellVerticalAlignment(libelleRappel, HasAlignment.ALIGN_MIDDLE); horizontalPanelRappel.setCellVerticalAlignment(aidecbRappel, HasAlignment.ALIGN_MIDDLE); horizontalPanelRappel.add(lbNotification); final Label libelleRappelAvant = new Label(constants.libelleRappelAvant()); horizontalPanelRappel.add(libelleRappelAvant); horizontalPanelRappel.setCellVerticalAlignment(libelleRappelAvant, HasAlignment.ALIGN_MIDDLE); horizontalPanelRappel.setSpacing(2); // Horizontal panel partie notification Mail final HorizontalPanel horizontalPanelMail = new HorizontalPanel(); cbRappelMail = new CheckBox(); aidecbRappelMail = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_RAPPEL_MAIL, isAdmin); ajouterAideComposant(aidecbRappelMail); horizontalPanelMail.add(aidecbRappelMail); horizontalPanelMail.add(cbRappelMail); cbRappelMail.ensureDebugId(viewDebudIdConstants.debugIdCbRappelMail()); final Label libelleRappelMail = new Label(constants.rappelMail()); horizontalPanelMail.add(libelleRappelMail); horizontalPanelMail.setCellVerticalAlignment(libelleRappelMail, HasAlignment.ALIGN_MIDDLE); horizontalPanelMail.setCellVerticalAlignment(aidecbRappelMail, HasAlignment.ALIGN_MIDDLE); horizontalPanelMail.setSpacing(2); // Horizontal panel partie notification ajout agenda final HorizontalPanel horizontalPanelAjoutAgenda = new HorizontalPanel(); cbAjoutAgenda = new CheckBox(); aideCbAjoutAgenda = new AideComposant(106010L, isAdmin); ajouterAideComposant(aideCbAjoutAgenda); horizontalPanelAjoutAgenda.add(aideCbAjoutAgenda); horizontalPanelAjoutAgenda.add(cbAjoutAgenda); cbAjoutAgenda.ensureDebugId(viewDebudIdConstants.debugIdCbAjoutAgenda()); final Label libelleAjoutAgenda = new Label(constants.ajoutAgenda()); horizontalPanelAjoutAgenda.add(libelleAjoutAgenda); horizontalPanelAjoutAgenda.setCellVerticalAlignment(libelleAjoutAgenda, HasAlignment.ALIGN_MIDDLE); horizontalPanelAjoutAgenda.setCellVerticalAlignment(aideCbAjoutAgenda, HasAlignment.ALIGN_MIDDLE); horizontalPanelAjoutAgenda.setSpacing(2); verticalPanelNotificationContenu.add(horizontalPanelRappel); verticalPanelNotificationContenu.add(horizontalPanelMail); verticalPanelNotificationContenu.add(horizontalPanelAjoutAgenda); captionNotification.add(verticalPanelNotificationContenu); flexTable.setWidget(1, 0, captionNotification); flexTable.getFlexCellFormatter().setColSpan(1, 0, 2); }
From source file:com.square.client.gwt.client.view.personne.action.PersonneActionContenuViewImpl.java
License:Open Source License
private void constructionAction() { final CaptionPanel captionAction = new CaptionPanel(constants.titreAction()); final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> properties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override//from ww w. ja v a 2s.com public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; // Construction partie nature, rsultat final FlexTable ftNatureResultat = new FlexTable(); ftNatureResultat.setWidth(AppControllerConstants.POURCENT_100); ftNatureResultat.getColumnFormatter().setWidth(0, "15%"); ftNatureResultat.getColumnFormatter().setWidth(1, "35%"); ftNatureResultat.getColumnFormatter().setWidth(2, "15%"); ftNatureResultat.getColumnFormatter().setWidth(3, "35%"); ftNatureResultat.setCellSpacing(5); // Nature slbNatureContact = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(properties); slbNatureContact.ensureDebugId(viewDebudIdConstants.debugIdSlbsNatureContactAction()); aideslbNatureContact = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_NATURE_CONTACT, isAdmin); ajouterAideComposant(aideslbNatureContact); slbNatureResultat = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(properties); slbNatureResultat.ensureDebugId(viewDebudIdConstants.debugIdSlbsNatureResultatAction()); aideslbNatureResultat = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_NATURE_RESULTAT, isAdmin); ajouterAideComposant(aideslbNatureResultat); // aideslbNatureContact = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_NATURE_CONTACT, isAdmin); // ajouterAideComposant(aideslbNatureContact); final HorizontalPanel hpNatureContact = new HorizontalPanel(); hpNatureContact.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); hpNatureContact.add(slbNatureContact); hpNatureContact .add(iconeErreurChampManager.createInstance("ActionModificationDto.nature", slbNatureContact)); hpNatureContact.add(aideslbNatureContact); hpNatureContact.setSpacing(2); lEtat = new Label(""); panelEtat = new HorizontalPanel(); panelEtat.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); panelEtat.add(slbNatureResultat); panelEtat.add( iconeErreurChampManager.createInstance("ActionModificationDto.natureResultat", slbNatureResultat)); panelEtat.add(aideslbNatureResultat); panelEtat.setSpacing(2); // Opportunit final Label ltitreOpportunite = new Label(constants.libelleOpportunite()); lOpportunite = new Hyperlink(); lOpportunite.setStyleName("lienSquare"); aidelOpportunite = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_OPPORTUNITE, isAdmin); ajouterAideComposant(aidelOpportunite); final HorizontalPanel panelLink = new HorizontalPanel(); panelLink.add(lOpportunite); panelLink.add(aidelOpportunite); panelLink.setCellVerticalAlignment(aidelOpportunite, HasVerticalAlignment.ALIGN_MIDDLE); panelLink.setCellVerticalAlignment(lOpportunite, HasVerticalAlignment.ALIGN_MIDDLE); panelLink.setSpacing(10); // Statut de l'action final HorizontalPanel panelStatut = new HorizontalPanel(); panelStatut.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); panelStatut.setSpacing(2); final Label libelleStatut = new Label(constants.libelleStatut()); slbStatut = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(properties); slbStatut.ensureDebugId(viewDebudIdConstants.debugIdSlbStatut()); aideslbStatut = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_STATUT, isAdmin); ajouterAideComposant(aideslbStatut); panelStatut.add(slbStatut); panelStatut.add(iconeErreurChampManager.createInstance("ActionModificationDto.statut", slbStatut)); panelStatut.add(aideslbStatut); // Rsultat de l'action slbsResultatAction = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(properties); slbsResultatAction.ensureDebugId(viewDebudIdConstants.debugIdSlbsResultatAction()); aideslbsResultatAction = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_RESULTAT_ACTION, isAdmin); ajouterAideComposant(aideslbsResultatAction); final HorizontalPanel panelResultatAction = new HorizontalPanel(); panelResultatAction.add(slbsResultatAction); panelResultatAction.add(aideslbsResultatAction); panelResultatAction.setSpacing(10); final Label libelleResultat = new Label(constants.libelleResultat()); // Construction zone de text pour l'historique des actions prcdentes htmlHistorique = new HTML(); htmlHistorique.ensureDebugId(viewDebudIdConstants.debugIdTaHistorique()); htmlHistorique.setWidth(AppControllerConstants.POURCENT_100); aidehtmlHistorique = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_HISTORIQUE, isAdmin); ajouterAideComposant(aidehtmlHistorique); final ScrollPanel conteneurHistorique = new ScrollPanel(); conteneurHistorique.setStylePrimaryName(SquareResources.INSTANCE.css().historiqueAction()); conteneurHistorique.setWidth(AppControllerConstants.POURCENT_100); conteneurHistorique.setHeight("100px"); conteneurHistorique.add(htmlHistorique); // Zone de texte rtaDescriptif = new RichTextArea(); rtaDescriptif.ensureDebugId(viewDebudIdConstants.debugIdRtaDescriptif()); rttToolbar = new RichTextToolbar(rtaDescriptif, RichTextToolbar.BOLD, RichTextToolbar.ITALIC, RichTextToolbar.UNDERLINE); rttToolbar.ensureDebugId(viewDebudIdConstants.debugIdRttToolbar()); rtpCommmentaire = new RichTextPanel(rttToolbar, rtaDescriptif); rtpCommmentaire.ensureDebugId(viewDebudIdConstants.debugIdRtpCommmentaire()); rttToolbar.setWidth(AppControllerConstants.POURCENT_100); rtpCommmentaire.setWidth(AppControllerConstants.POURCENT_100); aidertpCommentaire = new AideComposant(AideComposantConstants.AIDE_PERSONNE_ACTION_COMMENTAIRE, isAdmin); ajouterAideComposant(aidertpCommentaire); ftNatureResultat.setWidget(0, 0, new Label(constants.libelleNatureAction())); ftNatureResultat.setWidget(0, 1, hpNatureContact); ftNatureResultat.setWidget(0, 2, lEtat); ftNatureResultat.setWidget(0, 3, panelEtat); ftNatureResultat.setWidget(1, 0, ltitreOpportunite); ftNatureResultat.setWidget(1, 1, panelLink); ftNatureResultat.setWidget(2, 0, libelleStatut); ftNatureResultat.setWidget(2, 1, panelStatut); ftNatureResultat.setWidget(3, 0, libelleResultat); ftNatureResultat.setWidget(3, 1, panelResultatAction); ftNatureResultat.setWidget(4, 0, new Label(constants.notes())); ftNatureResultat.getFlexCellFormatter().setColSpan(4, 0, 4); ftNatureResultat.setWidget(5, 0, aidehtmlHistorique); ftNatureResultat.setWidget(6, 0, conteneurHistorique); ftNatureResultat.getFlexCellFormatter().setColSpan(6, 0, 4); ftNatureResultat.setWidget(7, 0, aidertpCommentaire); ftNatureResultat.setWidget(8, 0, rtpCommmentaire); ftNatureResultat.getFlexCellFormatter().setColSpan(8, 0, 4); captionAction.add(ftNatureResultat); flexTable.setWidget(3, 0, captionAction); flexTable.getFlexCellFormatter().setColSpan(3, 0, 2); }
From source file:com.square.client.gwt.client.view.personne.coordonnees.AdresseCreationViewImpl.java
License:Open Source License
/** * Construit un bloc avec un label et un champ pour l'affichage. *///from ww w . j a v a2s. com private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp, AideComposant aideComposant) { final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant); final HorizontalPanel panel = new HorizontalPanel(); panel.add(composant); panel.setSpacing(2); composant.setWidth("96%"); HorizontalPanel panelIcone = new HorizontalPanel(); // panelIcone.setSpacing(5); panelIcone.add(icone); panelIcone.add(aideComposant); panel.add(panelIcone); // panelIcone.setCellVerticalAlignment(aideComposant, HasVerticalAlignment.ALIGN_MIDDLE); panel.setCellVerticalAlignment(panelIcone, HasVerticalAlignment.ALIGN_MIDDLE); return panel; }
From source file:com.square.client.gwt.client.view.personne.coordonnees.PersonneCoordonneesViewImpl.java
License:Open Source License
private void construireBlocInformations() { final Label lTel = new Label(viewConstants.telephone()); final Label lTel2 = new Label(viewConstants.telephone()); final Label lEmail = new Label(viewConstants.email()); lTel.setWordWrap(false);/* ww w . j a v a 2 s . co m*/ lTel2.setWordWrap(false); lEmail.setWordWrap(false); final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; tbTelephone = new DecoratedTextBoxFormat(PersonneCoordonneesViewImplConstants.FORMAT_TELEPHONE_DEFAUT); tbTelephone.addStyleName(SquareResources.INSTANCE.css().champTelephone()); tbTelephone.ensureDebugId(viewDebugIdConstants.debugIdTbTelephone()); aidetbTelephone = new AideComposant(AideComposantConstants.AIDE_PERSONNE_COORDONNEES_TELEPHONE, isAdmin); ajouterAideComposant(aidetbTelephone); slbNatureTelephone = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( slbIdentifiantLibelleProperties); slbNatureTelephone.ensureDebugId(viewDebugIdConstants.debugIdSlbNatureTelephone()); slbNatureTelephone.addStyleName(SmatisResources.INSTANCE.css().listeNatureTelephone()); aideslbNatureTelephone = new AideComposant( AideComposantConstants.AIDE_PERSONNE_COORDONNEES_NATURE_TELEPHONE, isAdmin); ajouterAideComposant(aideslbNatureTelephone); tbTelephone2 = new DecoratedTextBoxFormat(PersonneCoordonneesViewImplConstants.FORMAT_TELEPHONE_DEFAUT); tbTelephone2.addStyleName(SquareResources.INSTANCE.css().champTelephone()); tbTelephone2.ensureDebugId(viewDebugIdConstants.debugIdTbTelephone2()); aidetbTelephone2 = new AideComposant(AideComposantConstants.AIDE_PERSONNE_COORDONNEES_TELEPHONE_DEUX, isAdmin); ajouterAideComposant(aidetbTelephone2); slbNatureTelephone2 = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( slbIdentifiantLibelleProperties); slbNatureTelephone2.ensureDebugId(viewDebugIdConstants.debugIdSlbNatureTelephone2()); slbNatureTelephone2.addStyleName(SmatisResources.INSTANCE.css().listeNatureTelephone()); aideslbNatureTelephone2 = new AideComposant( AideComposantConstants.AIDE_PERSONNE_COORDONNEES_NATURE_TELEPHONE_DEUX, isAdmin); ajouterAideComposant(aidetbTelephone2); tbEmail = new DecoratedTextBox(); tbEmail.setMaxLength(PersonneCoordonneesViewImplConstants.MAX_LENGTH_TB_EMAIL); tbEmail.ensureDebugId(viewDebugIdConstants.debugIdTbEmail()); tbEmail.setWidth("300px"); aidetbEmail = new AideComposant(AideComposantConstants.AIDE_PERSONNE_COORDONNEES_EMAIL, isAdmin); ajouterAideComposant(aidetbEmail); imgFlagPaysTelephone = new Image(SquareResources.INSTANCE.flagFr()); imgFlagPaysTelephone.ensureDebugId(viewDebugIdConstants.debugIdImgFlagPaysTelephone()); imgFlagPaysTelephone.addStyleName(SquareResources.INSTANCE.css().imgDrapeau()); imgFlagPaysTelephone2 = new Image(SquareResources.INSTANCE.flagFr()); imgFlagPaysTelephone2.ensureDebugId(viewDebugIdConstants.debugIdImgFlagPaysTelephone2()); imgFlagPaysTelephone2.addStyleName(SquareResources.INSTANCE.css().imgDrapeau()); final HorizontalPanel blocTel = new HorizontalPanel(); blocTel.setSpacing(2); blocTel.add(lTel); slbNatureTelephone.addStyleName(SquareResources.INSTANCE.css().textBoxNature()); blocTel.add(construireBlocIcone(tbTelephone, "TelephoneDto.numero.0", aidetbTelephone)); blocTel.add(construireBlocIcone(slbNatureTelephone, "TelephoneDto.nature.0", aideslbNatureTelephone)); blocTel.add(imgFlagPaysTelephone); imgTelephoneActif = new Image(SmatisResources.INSTANCE.iconePhoneActif()); imgTelephoneActif.addStyleName(SmatisResources.INSTANCE.css().imgTelephoneActif()); imgTelephoneActif.setVisible(false); imgTelephoneInactif = new Image(SmatisResources.INSTANCE.iconePhoneInactif()); imgTelephoneInactif.setVisible(false); blocTel.add(imgTelephoneActif); blocTel.add(imgTelephoneInactif); blocTel.setCellVerticalAlignment(lTel, HasAlignment.ALIGN_MIDDLE); final HorizontalPanel blocTel2 = new HorizontalPanel(); blocTel2.setSpacing(2); blocTel2.add(lTel2); slbNatureTelephone2.addStyleName(SquareResources.INSTANCE.css().textBoxNature()); blocTel2.add(construireBlocIcone(tbTelephone2, "TelephoneDto.numero.1", aidetbTelephone2)); blocTel2.add(construireBlocIcone(slbNatureTelephone2, "TelephoneDto.nature.1", aideslbNatureTelephone2)); blocTel2.add(imgFlagPaysTelephone2); imgTelephone2Actif = new Image(SmatisResources.INSTANCE.iconePhoneActif()); imgTelephone2Actif.addStyleName(SmatisResources.INSTANCE.css().imgTelephoneActif()); imgTelephone2Actif.setVisible(false); imgTelephone2Inactif = new Image(SmatisResources.INSTANCE.iconePhoneInactif()); imgTelephone2Inactif.setVisible(false); blocTel2.add(imgTelephone2Actif); blocTel2.add(imgTelephone2Inactif); blocTel2.setCellVerticalAlignment(lTel2, HasAlignment.ALIGN_MIDDLE); final FlexTable ftTelEmail = new FlexTable(); ftTelEmail.setWidth(AppControllerConstants.POURCENT_100); ftTelEmail.setWidget(0, 0, lTel); ftTelEmail.setWidget(0, 1, blocTel); ftTelEmail.setWidget(0, 2, lTel2); ftTelEmail.setWidget(0, 3, blocTel2); ftTelEmail.setWidget(1, 0, lEmail); ftTelEmail.setWidget(1, 1, construireBlocIcone(tbEmail, "EmailDto.adresse.0", aidetbEmail)); ftTelEmail.getColumnFormatter().setWidth(0, "4%"); ftTelEmail.getColumnFormatter().setWidth(1, "46%"); ftTelEmail.getColumnFormatter().setWidth(2, "4%"); ftTelEmail.getColumnFormatter().setWidth(3, "46%"); fieldSetPanelInformations.add(ftTelEmail); }
From source file:com.square.client.gwt.client.view.personne.coordonnees.PersonneCoordonneesViewImpl.java
License:Open Source License
/** * Construit un bloc avec un label et un champ pour l'affichage. *//*from w ww .ja v a 2s. c om*/ private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp, AideComposant aideComposant) { final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant); final HorizontalPanel panel = new HorizontalPanel(); panel.add(composant); final HorizontalPanel panelIcone = new HorizontalPanel(); // panelIcone.setSpacing(5); panelIcone.add(icone); panelIcone.add(aideComposant); panel.add(panelIcone); // panelIcone.setCellVerticalAlignment(aideComposant, HasVerticalAlignment.ALIGN_MIDDLE); panel.setCellVerticalAlignment(panelIcone, HasVerticalAlignment.ALIGN_MIDDLE); return panel; }
From source file:com.square.client.gwt.client.view.personne.coordonnees.PopupSelectionPaysViewImpl.java
License:Open Source License
/** * Constructeur.// w ww. j av a2s . c om * @param properties les proprits de la popup. */ public PopupSelectionPaysViewImpl(ListBoxPaysProperties properties) { super(popupConstants.titrePopup(), false, true, true); this.properties = properties; this.mappSuggestPays = new HashMap<Integer, PaysSimpleModel>(); // Construction du contenu de la popup final VerticalPanel contenuPopup = new VerticalPanel(); contenuPopup.setSpacing(5); // Construction de la zone de recherche final HorizontalPanel pRecherche = new HorizontalPanel(); pRecherche.setSpacing(5); final Label lRechercher = new Label(popupConstants.rechercher()); tbSaisie = new DecoratedTextBox(); pRecherche.add(lRechercher); pRecherche.setCellVerticalAlignment(lRechercher, HasAlignment.ALIGN_MIDDLE); pRecherche.add(tbSaisie); contenuPopup.add(pRecherche); // Construction du tableau des rsultats result = new ListGrid(); contenuPopup.add(result); // Ajout du bouton d'annulation btnAnnuler = new DecoratedButton(popupConstants.btnAnnuler()); contenuPopup.add(btnAnnuler); contenuPopup.setCellHorizontalAlignment(btnAnnuler, HasAlignment.ALIGN_CENTER); this.setWidget(contenuPopup); this.addStyleName(SquareResources.INSTANCE.css().popupSelectionPays()); }
From source file:com.square.client.gwt.client.view.personne.physique.creation.PersonnePhysiqueCreationViewImpl.java
License:Open Source License
/** * Construit le bloc des criteres de recherche. *//*from w w w.j a va 2 s. c o m*/ private Widget construitreBlocBoutons() { btnCreer = new DecoratedButton(viewConstants.creer()); btnCreer.ensureDebugId(viewDebugIdConstants.debugIdBtnCreer()); btnReduire = new DecoratedButton(viewConstants.reduire()); btnReduire.ensureDebugId(viewDebugIdConstants.debugIdBtnReduire()); btnAnnuler = new DecoratedButton(viewConstants.annuler()); btnAnnuler.ensureDebugId(viewDebugIdConstants.debugIdBtnAnnuler()); final HorizontalPanel conteneurBoutons = new HorizontalPanel(); conteneurBoutons.setSpacing(5); conteneurBoutons.add(btnCreer); conteneurBoutons.add(btnReduire); conteneurBoutons.add(btnAnnuler); conteneurBoutons.setCellVerticalAlignment(btnAnnuler, HasAlignment.ALIGN_MIDDLE); return conteneurBoutons; }
From source file:com.square.client.gwt.client.view.personne.physique.creation.PersonnePhysiqueCreationViewImpl.java
License:Open Source License
/** * Construit le bloc de l'adresse./*from w w w .ja v a 2 s . co m*/ */ private void construireBlocAdresse() { final Label lNumeroVoie = new Label(viewConstants.numeroVoie(), false); final Label lNatureVoie = new Label(viewConstants.natureVoie(), false); final Label lComplementNom = new Label(viewConstants.complementNom(), false); final Label lAdresse = new Label(viewConstants.adresse(), false); final Label lComplementAdresse = new Label(viewConstants.complementAdresse(), false); final Label lAutresComplements = new Label(viewConstants.autresComplements(), false); final Label lCodePostal = new Label(viewConstants.codePostal(), false); lVille = new Label(viewConstants.ville(), false); final Label lPays = new Label(viewConstants.pays(), false); tbNumeroVoie = new DecoratedTextBox(); tbNumeroVoie.setMaxLength(5); tbNumeroVoie.ensureDebugId(viewDebugIdConstants.debugIdTbNumeroVoie()); aidetbNumeroVoie = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_NUMERO_VOIE, isAdmin); ajouterAideComposant(aidetbNumeroVoie); slbNatureVoie = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbNatureVoie.ensureDebugId(viewDebugIdConstants.debugIdSlbNatureVoie()); aideslbNatureVoie = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_NATURE_VOIE, isAdmin); ajouterAideComposant(aideslbNatureVoie); tbComplementNom = new DecoratedTextBox(); tbComplementNom.setMaxLength(38); tbComplementNom.ensureDebugId(viewDebugIdConstants.debugIdTbComplementNom()); aidetbComplementNom = new AideComposant( AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_COMPLEMENT_NOM, isAdmin); ajouterAideComposant(aidetbComplementNom); tbAdresse = new DecoratedTextBox(); tbAdresse.setMaxLength(38); tbAdresse.ensureDebugId(viewDebugIdConstants.debugIdTbAdresse()); aidetbAdresse = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_ADRESSE, isAdmin); ajouterAideComposant(aidetbAdresse); tbComplementAdresse = new DecoratedTextBox(); tbComplementAdresse.setMaxLength(38); tbComplementAdresse.ensureDebugId(viewDebugIdConstants.debugIdTbComplementAdresse()); aidetbComplementAdresse = new AideComposant( AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_COMPLEMENT_ADRESSE, isAdmin); ajouterAideComposant(aidetbComplementAdresse); tbAutresComplements = new DecoratedTextBox(); tbAutresComplements.setMaxLength(38); tbAutresComplements.ensureDebugId(viewDebugIdConstants.debugIdTbAutresComplements()); aidetbAutresComplements = new AideComposant( AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_AUTRES_COMPLEMENTS, isAdmin); ajouterAideComposant(aidetbAutresComplements); final SuggestListBoxSingleProperties<CodePostalCommuneModel> properties = new SuggestListBoxSingleProperties<CodePostalCommuneModel>() { @Override public String getSelectSuggestRenderer(CodePostalCommuneModel row) { return row == null || row.getCodePostal() == null ? "" : row.getCodePostal().getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(CodePostalCommuneModel row) { if (row == null) { return new String[] { "", "" }; } else { // Affichage du libell de la commune si diffrent du libell d'acheminement String libelleCommune = row.getLibelleAcheminement(); if (!row.getLibelleAcheminement().equals(row.getCommune().getLibelle())) { libelleCommune += " (" + row.getCommune().getLibelle() + ")"; } return new String[] { row.getCodePostal().getLibelle(), libelleCommune }; } } }; slbCodePostal = new DecoratedSuggestListBoxSingle<CodePostalCommuneModel>(properties); slbCodePostal.setMaxLenght(5); slbCodePostal.ensureDebugId(viewDebugIdConstants.debugIdSlbCodePostal()); aideslbCodePostal = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_CODE_POSTAL, isAdmin); ajouterAideComposant(aideslbCodePostal); slbPays = new DecoratedSuggestListBoxSingle<IdentifiantLibelleBooleanModel>( slbIdentifiantLibelleBooleanProperties); slbPays.ensureDebugId(viewDebugIdConstants.debugIdSlbPays()); aideslbPays = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_PAYS, isAdmin); ajouterAideComposant(aideslbPays); lValueVille = new Label(); lValueVille.ensureDebugId(viewDebugIdConstants.debugIdLValueVille()); tbCodePostalEtranger = new DecoratedTextBox(); tbCodePostalEtranger.setMaxLength(10); tbCodePostalEtranger.ensureDebugId(viewDebugIdConstants.debugIdTbCodePostalEtranger()); aidetbCodePostalEtranger = new AideComposant( AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_CODE_POSTAL_ETRANGER, isAdmin); ajouterAideComposant(aidetbCodePostalEtranger); tbCommuneEtranger = new DecoratedTextBox(); tbCommuneEtranger.setMaxLength(38); tbCommuneEtranger.ensureDebugId(viewDebugIdConstants.debugIdTbCommuneEtranger()); aidetbCommuneEtranger = new AideComposant( AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_CREATION_COMMUNE_ETRANGER, isAdmin); ajouterAideComposant(aidetbCommuneEtranger); final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.titreAdresse()); final VerticalPanel verticalPanel = new VerticalPanel(); verticalPanel.setSpacing(5); verticalPanel.setWidth(AppControllerConstants.POURCENT_100); final FlexTable flexTable = new FlexTable(); int row = 0; final int spacing = 3; final HorizontalPanel ligneComplementNom = new HorizontalPanel(); ligneComplementNom.setSpacing(spacing); ligneComplementNom .add(construireBlocIcone(tbComplementNom, "AdresseDto.complementNom", aidetbComplementNom)); flexTable.setWidget(row, 0, lComplementNom); flexTable.setWidget(row++, 1, ligneComplementNom); final HorizontalPanel ligneNumeroVoie = new HorizontalPanel(); ligneNumeroVoie.setSpacing(spacing); ligneNumeroVoie.add(construireBlocIcone(tbNumeroVoie, "AdresseDto.numVoie", aidetbNumeroVoie)); ligneNumeroVoie.add(lNatureVoie); ligneNumeroVoie.add(construireBlocIcone(slbNatureVoie, "AdresseDto.typeVoie", aideslbNatureVoie)); ligneNumeroVoie.setCellVerticalAlignment(lNatureVoie, HasAlignment.ALIGN_MIDDLE); flexTable.setWidget(row, 0, lNumeroVoie); flexTable.setWidget(row++, 1, ligneNumeroVoie); final HorizontalPanel ligneAdresse = new HorizontalPanel(); ligneAdresse.setSpacing(spacing); ligneAdresse.add(construireBlocIcone(tbAdresse, "AdresseDto.nomVoie", aidetbAdresse)); flexTable.setWidget(row, 0, lAdresse); flexTable.setWidget(row++, 1, ligneAdresse); final HorizontalPanel ligneComplementAdresse = new HorizontalPanel(); ligneComplementAdresse.setSpacing(spacing); ligneComplementAdresse.add( construireBlocIcone(tbComplementAdresse, "AdresseDto.complementAdresse", aidetbComplementAdresse)); flexTable.setWidget(row, 0, lComplementAdresse); flexTable.setWidget(row++, 1, ligneComplementAdresse); final HorizontalPanel ligneAutresComplements = new HorizontalPanel(); ligneAutresComplements.setSpacing(spacing); ligneAutresComplements.add( construireBlocIcone(tbAutresComplements, "AdresseDto.autresComplements", aidetbAutresComplements)); flexTable.setWidget(row, 0, lAutresComplements); flexTable.setWidget(row++, 1, ligneAutresComplements); final HorizontalPanel lignePays = new HorizontalPanel(); lignePays.setSpacing(spacing); lignePays.add(construireBlocIcone(slbPays, "AdresseDto.pays", aideslbPays)); flexTable.setWidget(row, 0, lPays); flexTable.setWidget(row++, 1, lignePays); final VerticalPanel blocCodePostal = new VerticalPanel(); ligneCodePostal = new HorizontalPanel(); ligneCodePostal.setSpacing(spacing); ligneCodePostal.add(construireBlocIcone(slbCodePostal, "AdresseDto.codePostal", aideslbCodePostal)); blocCodePostal.add(ligneCodePostal); ligneCodePostalEtranger = new HorizontalPanel(); ligneCodePostalEtranger.setSpacing(spacing); ligneCodePostalEtranger.add(construireBlocIcone(tbCodePostalEtranger, "AdresseDto.codePostalEtranger", aidetbCodePostalEtranger)); blocCodePostal.add(ligneCodePostalEtranger); flexTable.setWidget(row, 0, lCodePostal); flexTable.setWidget(row++, 1, blocCodePostal); final VerticalPanel blocVille = new VerticalPanel(); ligneVille = new HorizontalPanel(); ligneVille.setSpacing(spacing); ligneVille.add(lValueVille); blocVille.add(ligneVille); ligneVilleEtranger = new HorizontalPanel(); ligneVilleEtranger.setSpacing(spacing); ligneVilleEtranger .add(construireBlocIcone(tbCommuneEtranger, "AdresseDto.communeEtranger", aidetbCommuneEtranger)); blocVille.add(ligneVilleEtranger); flexTable.setWidget(row, 0, lVille); flexTable.setWidget(row++, 1, blocVille); verticalPanel.add(flexTable); fieldSetPanel.add(verticalPanel); conteneur.add(fieldSetPanel); }
From source file:com.square.client.gwt.client.view.personne.physique.gestion.GestionPersonnePhysiqueViewImpl.java
License:Open Source License
/** * Construit un affichage pour le resume. * @return l'affichage correspondant au resume. */// w w w .j ava 2 s . co m private Widget construireGestionPanel() { final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleBooleanModel> slbIdentifiantLibelleBooleanProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleBooleanModel>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleBooleanModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleBooleanModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleOuiNonModel> slbIdentifiantLibelleOuiNonProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleOuiNonModel>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleOuiNonModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleOuiNonModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; btGenregistrer = new DecoratedButton(constants.lbGenregistrer()); btGenregistrer.ensureDebugId(constantsDebugId.debugIdBtGenregistrer()); // disableElement(btGenregistrer.getElement()); btGAnnuler = new DecoratedButton(constants.lbGannuler()); btGAnnuler.ensureDebugId(constantsDebugId.debugIdBtGAnnuler()); final HorizontalPanel conteneurBoutons = new HorizontalPanel(); conteneurBoutons.setSpacing(5); conteneurBoutons.add(btGenregistrer); conteneurBoutons.add(btGAnnuler); conteneurBoutons.setCellVerticalAlignment(btGAnnuler, HasVerticalAlignment.ALIGN_MIDDLE); final VerticalPanel panel = new VerticalPanel(); panel.setWidth(AppControllerConstants.POURCENT_100); panel.setSpacing(10); panel.add(construireBlocInformations(slbIdentifiantLibelleProperties)); panel.add(construireBlocInfosSup(slbIdentifiantLibelleProperties, slbIdentifiantLibelleBooleanProperties)); panel.add(construireBlocCreation()); panel.add(conteneurBoutons); panel.setCellHorizontalAlignment(conteneurBoutons, HasHorizontalAlignment.ALIGN_RIGHT); return panel; }
From source file:com.square.client.gwt.client.view.personne.physique.gestion.GestionPersonnePhysiqueViewImpl.java
License:Open Source License
private HorizontalPanel construireBlocAide(final Widget composant, AideComposant aide) { final HorizontalPanel panel = new HorizontalPanel(); panel.setSpacing(0);/*w w w . j a va2 s . com*/ panel.add(composant); panel.add(aide); panel.setCellVerticalAlignment(aide, HasVerticalAlignment.ALIGN_MIDDLE); panel.setCellHorizontalAlignment(aide, HasHorizontalAlignment.ALIGN_CENTER); panel.setCellWidth(aide, "40"); return panel; }