List of usage examples for com.google.gwt.user.client.ui FlexTable getFlexCellFormatter
public FlexCellFormatter getFlexCellFormatter()
From source file:com.square.client.gwt.client.view.personne.relations.PersonneRelationPopupViewImpl.java
License:Open Source License
/** * Construction de la popup ajout sur personne morale. *//* w w w. ja va 2 s . c o m*/ private void construirePopup() { 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() }; } }; // TYPE DE PERSONNE slbTypePersonne = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbTypePersonne.ensureDebugId(viewDebugIdConstants.debugIdLbTypePersonne()); aideslbTypePersonne = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_TYPE_PERSONNE, isAdmin); ajouterAideComposant(aideslbTypePersonne); final HorizontalPanel panelslbTypePersonne = new HorizontalPanel(); panelslbTypePersonne.add(slbTypePersonne); panelslbTypePersonne.add(aideslbTypePersonne); panelslbTypePersonne.setSpacing(5); final FlexTable ftTypePersonne = new FlexTable(); ftTypePersonne.setWidth(AppControllerConstants.POURCENT_100); ftTypePersonne.setCellSpacing(5); ftTypePersonne.setWidget(0, 0, new Label(constants.lbtypePersonne())); ftTypePersonne.setWidget(0, 1, panelslbTypePersonne); ftTypePersonne.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE); captionTypePersonne = new CaptionPanel(constants.lbCaptionTypePersonne()); captionTypePersonne.add(ftTypePersonne); final CaptionPanel captionType = new CaptionPanel(constants.lbCaptionReseau()); final VerticalPanel panelType = new VerticalPanel(); panelType.setSpacing(3); // TYPE DE RELATION final SuggestListBoxSingleProperties<ItemValueModel> properties = new SuggestListBoxSingleProperties<ItemValueModel>() { @Override public String getSelectSuggestRenderer(ItemValueModel row) { return row == null ? "" : row.getValue(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(ItemValueModel row) { return new String[] { row == null ? "" : row.getValue() }; } }; slbTypeRelation = new DecoratedSuggestListBoxSingle<ItemValueModel>(properties); slbTypeRelation.ensureDebugId(viewDebugIdConstants.debugIdSlbTypeRelation()); aideslbTypeRelation = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_TYPE_RELATION, isAdmin); ajouterAideComposant(aideslbTypeRelation); final FlexTable ftTypeRelation = new FlexTable(); ftTypeRelation.setWidth(AppControllerConstants.POURCENT_100); ftTypeRelation.setCellSpacing(5); ftTypeRelation.setWidget(0, 0, new Label(constants.typeRelation())); ftTypeRelation.setWidget(0, 1, construireBlocIcone(slbTypeRelation, "RelationDto.type.libelle", aideslbTypeRelation)); ftTypeRelation.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE); captionType.add(ftTypeRelation); // PANEL PERSONNE MORALE captionPersonneMorale = new CaptionPanel(constants.lbCaptionPersonneMorale()); tbRaisonSocialePm = new DecoratedTextBox(); tbRaisonSocialePm.ensureDebugId(viewDebugIdConstants.debugIdTbNumEntreprisePm()); aidetbRaisonSocialePm = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_RAISON_SOCIALE, isAdmin); ajouterAideComposant(aidetbRaisonSocialePm); final HorizontalPanel paneltbRaisonSocialePm = new HorizontalPanel(); paneltbRaisonSocialePm.add(tbRaisonSocialePm); paneltbRaisonSocialePm.add(aidetbRaisonSocialePm); paneltbRaisonSocialePm.setSpacing(5); tbNumEntreprisePm = new DecoratedTextBox(); tbNumEntreprisePm.ensureDebugId(viewDebugIdConstants.debugIdTbNumEntreprisePm()); aidetbNumEntreprisePm = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_NUM_ENTREPRISE, isAdmin); ajouterAideComposant(aidetbNumEntreprisePm); final HorizontalPanel paneltbNumEntreprisePm = new HorizontalPanel(); paneltbNumEntreprisePm.add(tbNumEntreprisePm); paneltbNumEntreprisePm.add(aidetbNumEntreprisePm); paneltbNumEntreprisePm.setSpacing(5); btnRechercherPm = new DecoratedButton(constants.rechercher()); btnRechercherPm.ensureDebugId(viewDebugIdConstants.debugIdBtnRechercherPm()); remotePagingTablePm = new RemotePagingTable<PersonneMoraleRechercheModel, PersonneMoralCriteresRechercheModel>( 10, true) { @Override public void setDataProvider(RemotePagingCriteriasGwt<PersonneMoralCriteresRechercheModel> params, AsyncCallback<RemotePagingResultsGwt<PersonneMoraleRechercheModel>> callback) { remotePagingHandlerManagerPm.fireEvent( new SetDataProviderEvent<PersonneMoralCriteresRechercheModel, PersonneMoraleRechercheModel>( params, callback)); } @Override public int setDefaultSortAsc() { return RemotePagingSortGwt.REMOTE_PAGING_SORT_ASC; } @Override public String setDefaultSortField() { return "numEntreprise"; } @Override public Column[] setHeader() { return new Column[] { new Column(constants.headerNumeroEntreprise(), constants.fieldNumeroEntreprise()), new Column(constants.headerRaisonSociale(), constants.fieldRaisonSociale()), new Column(constants.headerNature(), constants.fieldNature()) }; } @Override public void setRow(int row, PersonneMoraleRechercheModel personneMorale) { setWidget(row, 0, new Label(personneMorale.getNumeroEntreprise())); setWidget(row, 1, new Label(personneMorale.getRaisonSociale())); setWidget(row, 2, new Label( personneMorale.getNature() != null ? personneMorale.getNature().getLibelle() : "")); } @Override public void setCellClicked(PersonneMoraleRechercheModel objet) { remotePagingHandlerManagerPm .fireEvent(new SetCellClickedEvent<PersonneMoraleRechercheModel>(objet)); } }; remotePagingTablePm.ensureDebugId(viewDebugIdConstants.debugIdRemotePagingTablePm()); remotePagingHandlerManagerPm = new HandlerManager(remotePagingTablePm); remotePagingTablePm.setWidth(AppControllerConstants.POURCENT_100); final FlexTable ftRecherchePM = new FlexTable(); ftRecherchePM.setWidth(AppControllerConstants.POURCENT_100); ftRecherchePM.setCellSpacing(5); ftRecherchePM.setWidget(0, 0, new Label(constants.raisonSociale())); ftRecherchePM.setWidget(0, 1, paneltbRaisonSocialePm); ftRecherchePM.setWidget(1, 0, new Label(constants.numEntreprise())); ftRecherchePM.setWidget(1, 1, paneltbNumEntreprisePm); ftRecherchePM.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE); ftRecherchePM.setWidget(2, 0, btnRechercherPm); ftRecherchePM.getFlexCellFormatter().setColSpan(2, 0, 2); ftRecherchePM.getCellFormatter().setHorizontalAlignment(2, 0, HasAlignment.ALIGN_CENTER); ftRecherchePM.setWidget(3, 0, remotePagingTablePm); ftRecherchePM.getFlexCellFormatter().setColSpan(3, 0, 2); captionPersonneMorale.add(ftRecherchePM); // PERSONNE PHYSIQUE final Label lCivilite = new Label(constants.civilite()); final Label lNom = new Label(constants.nom()); final Label lPrenom = new Label(constants.prenom()); final Label lDate = new Label(constants.dateNaissance()); lTelephone = new Label(constants.telephone()); captionPersonnePhysique = new CaptionPanel(constants.lbCaptionPersonnePhysique()); slbCivilite = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbCivilite.ensureDebugId(viewDebugIdConstants.debugIdSlbCivilite()); aideslbCivilite = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_CIVILITE, isAdmin); ajouterAideComposant(aideslbCivilite); tbNom = new DecoratedTextBoxFormat("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); tbNom.ensureDebugId(viewDebugIdConstants.debugIdTbNom()); aidetbNom = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_NOM, isAdmin); ajouterAideComposant(aidetbNom); tbPrenom = new DecoratedTextBoxFormat("AAAAAAAAAAAAAAAAAAAAAAAAA"); tbPrenom.ensureDebugId(viewDebugIdConstants.debugIdTbPrenom()); aidetbPrenom = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_PRENOM, isAdmin); ajouterAideComposant(aidetbPrenom); cdbDateNaissance = new DecoratedCalendrierDateBox(true); cdbDateNaissance.ensureDebugId(viewDebugIdConstants.debugIdCdbDateNaissance()); aidecdbDateNaissance = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_DATE_NAISSANCE, isAdmin); ajouterAideComposant(aidecdbDateNaissance); tbTelephone = new DecoratedTextBoxFormat("NN NN NN NN NN"); tbTelephone.ensureDebugId(viewDebugIdConstants.debugIdTbTelephone()); aidetbTelephone = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_TELEHONE, isAdmin); ajouterAideComposant(aidetbTelephone); slbNatureTelephone = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( slbIdentifiantLibelleProperties); slbNatureTelephone.ensureDebugId(viewDebugIdConstants.debugIdSlbNatureTelephone()); aideslbNatureTelephone = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_NATURE_TELEPHONE, isAdmin); ajouterAideComposant(aideslbNatureTelephone); imgFlagPaysTelephone = new Image(SquareResources.INSTANCE.flagFr()); imgFlagPaysTelephone.ensureDebugId(viewDebugIdConstants.debugIdImgFlagPaysTelephone()); imgFlagPaysTelephone.addStyleName(SquareResources.INSTANCE.css().imgDrapeau()); ligneTelephone = new HorizontalPanel(); ligneTelephone.setSpacing(3); ligneTelephone.add(construireBlocIcone(tbTelephone, "TelephoneDto.numero.0", aidetbTelephone)); ligneTelephone .add(construireBlocIcone(slbNatureTelephone, "TelephoneDto.nature.0", aideslbNatureTelephone)); ligneTelephone.add(imgFlagPaysTelephone); final FlexTable ftPersonnePhysique = new FlexTable(); ftPersonnePhysique.setWidth(AppControllerConstants.POURCENT_100); ftPersonnePhysique.setCellSpacing(5); ftPersonnePhysique.setWidget(0, 0, lCivilite); ftPersonnePhysique.setWidget(0, 1, construireBlocIcone(slbCivilite, "PersonnePhysiqueCopieDto.civilite", aideslbCivilite)); ftPersonnePhysique.setWidget(1, 0, lNom); ftPersonnePhysique.setWidget(1, 1, construireBlocIcone(tbNom, "PersonnePhysiqueCopieDto.nom", aidetbNom)); ftPersonnePhysique.setWidget(2, 0, lPrenom); ftPersonnePhysique.setWidget(2, 1, construireBlocIcone(tbPrenom, "PersonnePhysiqueCopieDto.prenom", aidetbPrenom)); ftPersonnePhysique.setWidget(3, 0, lDate); ftPersonnePhysique.setWidget(3, 1, construireBlocIcone(cdbDateNaissance, "PersonnePhysiqueCopieDto.dateNaissance", aidecdbDateNaissance)); ftPersonnePhysique.setWidget(4, 0, lTelephone); ftPersonnePhysique.setWidget(4, 1, ligneTelephone); ftPersonnePhysique.setWidget(5, 0, construirePanelErreursPersonneSource()); ftPersonnePhysique.getFlexCellFormatter().setColSpan(5, 0, 2); ftPersonnePhysique.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE); captionPersonnePhysique.add(ftPersonnePhysique); // Infos sant // Annulation 5449 //construireBlocInfosSante(); // CONTENEUR PERSONNE MORALE ET PHYSIQUE final VerticalPanel panelCible = new VerticalPanel(); panelCible.setWidth(AppControllerConstants.POURCENT_100); panelCible.add(captionPersonneMorale); panelCible.add(captionPersonnePhysique); //panelCible.add(captionInfosSante); // CONTENEUR BOUTONS final HorizontalPanel conteneurBoutons = new HorizontalPanel(); btEnregistrerCreation = new DecoratedButton(constants.enregistrer()); btEnregistrerCreation.ensureDebugId(viewDebugIdConstants.debugIdBtEnregistrerCreation()); btnReduire = new DecoratedButton(constants.reduire()); btnReduire.ensureDebugId(viewDebugIdConstants.debugIdBtnReduire()); btAnnuler = new DecoratedButton(constants.annuler()); btAnnuler.ensureDebugId(viewDebugIdConstants.debugIdBtnAnnuler()); conteneurBoutons.add(btEnregistrerCreation); conteneurBoutons.add(btnReduire); conteneurBoutons.add(btAnnuler); conteneurBoutons.setSpacing(5); // CONSTRUCTION DU CONTENEUR PRINCIPAL panelGlobal = new VerticalPanel(); panelGlobal.setSpacing(10); panelGlobal.setWidth(AppControllerConstants.POURCENT_100); panelGlobal.add(captionTypePersonne); panelGlobal.add(captionType); panelGlobal.add(panelCible); // FOCUS PANEL POUR GERER LES KEY HANDLERS focusPanel = new FocusPanel(); focusPanel.setWidth(AppControllerConstants.POURCENT_100); focusPanel.add(panelGlobal); final VerticalPanel conteneur = new VerticalPanel(); conteneur.add(focusPanel); conteneur.add(conteneurBoutons); conteneur.setCellHorizontalAlignment(conteneurBoutons, HasHorizontalAlignment.ALIGN_CENTER); // CREATION DE LA POPUP popupCreation = new Popup(constants.textPopupCreationGenerique(), false, true, true); popupCreation.setWidget(conteneur, 0); popupCreation.addStyleName(SquareResources.INSTANCE.css().popupAjoutRelation()); // on en fait une popup minimisable minimizablePopup = new PopupMinimizable(popupCreation, constants.textPopupCreationGenerique(), btnReduire); }
From source file:com.square.composant.contrat.square.client.view.ContratContenuViewImpl.java
License:Open Source License
@Override public void chargerGarantieAjustement(final List<AjustementTarifModel> listesAjustements) { // Tableau des ajustements final Label lReference = new Label(viewConstants.titreColonneAjustementReference()); final Label lLibelle = new Label(viewConstants.titreColonneAjustementLibelle()); final Label lTarif = new Label(viewConstants.titreColonneAjustementTarif()); final Label lDateDebut = new Label(viewConstants.titreColonneAjustementDateDebut()); final Label lDateFin = new Label(viewConstants.titreColonneAjustementDateFin()); final FlexTable panelTableauAjustements = new FlexTable(); panelTableauAjustements.setWidth(ContratsViewImplConstants.POURCENT_100); panelTableauAjustements.setStylePrimaryName(resources.css().tableau()); panelTableauAjustements.setCellPadding(6); panelTableauAjustements.setWidget(0, 0, lReference); panelTableauAjustements.setWidget(0, 1, lLibelle); panelTableauAjustements.setWidget(0, 2, lTarif); panelTableauAjustements.setWidget(0, 3, lDateDebut); panelTableauAjustements.setWidget(0, 4, lDateFin); panelTableauAjustements.getRowFormatter().setStyleName(0, resources.css().ligneEnteteColonne()); for (int idxCol = 0; idxCol < 5; idxCol++) { panelTableauAjustements.getFlexCellFormatter().setHorizontalAlignment(0, idxCol, HasHorizontalAlignment.ALIGN_CENTER); }/*from ww w . j a va2 s . c om*/ for (AjustementTarifModel ajustement : listesAjustements) { final ContratGarantieAjustementViewImpl viewAjustement = new ContratGarantieAjustementViewImpl( ajustement); final int indexSuivant = panelTableauAjustements.getRowCount(); panelTableauAjustements.setWidget(indexSuivant, 0, viewAjustement.getLabelReference()); panelTableauAjustements.setWidget(indexSuivant, 1, viewAjustement.getLabelLibelle()); panelTableauAjustements.setWidget(indexSuivant, 2, viewAjustement.getLabelTarif()); panelTableauAjustements.setWidget(indexSuivant, 3, viewAjustement.getLabelDateDebut()); panelTableauAjustements.setWidget(indexSuivant, 4, viewAjustement.getLabelDateFin()); panelTableauAjustements.getFlexCellFormatter().setHorizontalAlignment(indexSuivant, 2, HasHorizontalAlignment.ALIGN_RIGHT); panelTableauAjustements.getFlexCellFormatter().setHorizontalAlignment(indexSuivant, 3, HasHorizontalAlignment.ALIGN_CENTER); panelTableauAjustements.getFlexCellFormatter().setHorizontalAlignment(indexSuivant, 4, HasHorizontalAlignment.ALIGN_CENTER); } // Ajustements final CaptionPanel captionPanelAjustements = new CaptionPanel(viewConstants.titreAjustements()); captionPanelAjustements.add(panelTableauAjustements); conteneurGlobal.add(captionPanelAjustements); }
From source file:com.square.composant.cotisations.client.view.moteur.recherche.MoteurRechercheCotisationsViewImpl.java
License:Open Source License
private Widget construireBlocRecherche() { final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override/* w w w . j a v a 2 s .c om*/ 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<CodeAiaLibelleModel> slbCodeAiaLibelleProperties = new SuggestListBoxSingleProperties<CodeAiaLibelleModel>() { @Override public String getSelectSuggestRenderer(CodeAiaLibelleModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(CodeAiaLibelleModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; slbContrats = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbModesPaiement = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( slbIdentifiantLibelleProperties); slbSituations = new DecoratedSuggestListBoxSingle<CodeAiaLibelleModel>(slbCodeAiaLibelleProperties); cdbDateDebutPeriode = new DecoratedCalendrierDateBox(); cdbDateFinPeriode = new DecoratedCalendrierDateBox(); tbMontantMax = new DecoratedTextBox(); tbMontantMax.setWidth(MoteurRechercheCotisationsViewImplConstants.LARGEUR_TB_MONTANT); tbMontantMin = new DecoratedTextBox(); tbMontantMin.setWidth(MoteurRechercheCotisationsViewImplConstants.LARGEUR_TB_MONTANT); lValueSoldeGlobalActuel = new Label(); final Label lContrats = creerLibelle(viewConstants.contrats()); final Label lDatePeriode = creerLibelle(viewConstants.datePeriode()); final Label lPeriodeSeparateur = creerLibelle(viewConstants.separateur()); final Label lModesPaiement = creerLibelle(viewConstants.modesPaiement()); final Label lMontant = creerLibelle(viewConstants.montant()); final Label lMontantSeparateur = creerLibelle(viewConstants.separateur()); final Label lSituation = creerLibelle(viewConstants.situation()); final Label lSoldeGlobalActuel = creerLibelle(viewConstants.soldeGlobalActuel()); final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.blocRechercher()); final FlexTable fpRecherche = new FlexTable(); fpRecherche.setWidth(ComposantCotisationsConstants.POURCENT_100); fpRecherche.setCellSpacing(5); fpRecherche.setWidget(0, 0, lContrats); fpRecherche.setWidget(0, 1, slbContrats); fpRecherche.setWidget(0, 2, lDatePeriode); fpRecherche.setWidget(0, 3, cdbDateDebutPeriode); fpRecherche.setWidget(0, 4, lPeriodeSeparateur); fpRecherche.setWidget(0, 5, cdbDateFinPeriode); fpRecherche.setWidget(1, 0, lModesPaiement); fpRecherche.setWidget(1, 1, slbModesPaiement); fpRecherche.setWidget(1, 2, lMontant); fpRecherche.setWidget(1, 3, tbMontantMin); fpRecherche.setWidget(1, 4, lMontantSeparateur); fpRecherche.setWidget(1, 5, tbMontantMax); fpRecherche.setWidget(2, 0, lSituation); fpRecherche.setWidget(2, 1, slbSituations); fpRecherche.setWidget(2, 2, lSoldeGlobalActuel); fpRecherche.setWidget(2, 3, lValueSoldeGlobalActuel); fpRecherche.getFlexCellFormatter().setColSpan(2, 3, 3); fieldSetPanel.add(fpRecherche); return fieldSetPanel; }
From source file:com.square.composant.ged.square.client.view.associationdocumentsaction.AssociationDocumentsActionViewImpl.java
License:Open Source License
/** Constructeur par dfaut. */ public AssociationDocumentsActionViewImpl() { super(viewConstants.titrePopup(), false, true, true); documentsClientsTree = new Tree(); documentsActionTree = new Tree(); final FlexTable mainPanel = new FlexTable(); final ScrollPanel scrollClient = new ScrollPanel(); scrollClient.add(documentsClientsTree); scrollClient.setSize("290px", POURCENT_100); final ScrollPanel scrollActions = new ScrollPanel(); scrollActions.setSize("290px", POURCENT_100); scrollActions.add(documentsActionTree); final CaptionPanel panelDocumentsClients = new CaptionPanel(viewConstants.titreDocumentsClient()); panelDocumentsClients.setSize("300px", "300px"); panelDocumentsClients.add(scrollClient); final CaptionPanel panelDocumentsAction = new CaptionPanel(viewConstants.titreDocumentsAction()); panelDocumentsAction.setSize("300px", "300px"); panelDocumentsAction.add(scrollActions); mainPanel.setWidget(0, 0, panelDocumentsClients); mainPanel.setWidget(0, 2, panelDocumentsAction); boutonAnnuler = new DecoratedButton(viewConstants.boutonAnnuler()); boutonAjouter = new DecoratedButton(viewConstants.boutonAjouter()); boutonEnlever = new DecoratedButton(viewConstants.boutonEnlever()); boutonAjouterDocument = new DecoratedButton(viewConstants.boutonAjouterDocument()); boutonEnregistrer = new DecoratedButton(viewConstants.boutonEnregistrer()); boutonAjouter.addStyleName("boutonPopupActionSelectionDocument"); boutonEnlever.addStyleName("boutonPopupActionSelectionDocument"); boutonAjouterDocument.addStyleName("boutonPopupSelectionDocument"); boutonEnregistrer.addStyleName("boutonPopupSelectionDocument"); final VerticalPanel panelBoutonsAction = new VerticalPanel(); panelBoutonsAction.add(boutonAjouter); panelBoutonsAction.add(boutonEnlever); mainPanel.setWidget(0, 1, panelBoutonsAction); final HorizontalPanel panelBoutons = new HorizontalPanel(); panelBoutons.add(boutonAnnuler);/*from www .j av a 2 s . com*/ panelBoutons.add(boutonEnregistrer); panelBoutons.add(boutonAjouterDocument); mainPanel.setWidget(1, 0, panelBoutons); mainPanel.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_CENTER); mainPanel.getFlexCellFormatter().setColSpan(1, 0, 3); this.setWidget(mainPanel); this.addStyleName("popupActionSelectionDocument"); }
From source file:com.square.composant.tarificateur.square.client.view.adhesion.BlocInfoSanteCompleteViewImpl.java
License:Open Source License
/** * Ajoute un panel contenant les informations d'un enfant. * @param enfant/* w ww .j a va2s.c o m*/ */ private void construirePanel(String suffix) { final Label lNumSs = new Label(viewConstants.lNumSs()); lRelation = new Label(viewConstants.relation()); final Label lRegime = new Label(viewConstants.lRegime()); final Label lCaisse = new Label(viewConstants.lCaisse()); final Label lTns = new Label(viewConstants.lTns(), false); final Label lLoiMadelin = new Label(viewConstants.lLoiMadelin(), false); final Label lcouvertNow = new Label(viewConstants.lcouvertNow(), false); final Label lcouvert6DerniersMois = new Label(viewConstants.lcouvert6DerniersMois(), 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() }; } }; final SuggestListBoxSingleProperties<IdentifiantEidLibelleModel> slbIdentifiantEidLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantEidLibelleModel>() { @Override public String getSelectSuggestRenderer(IdentifiantEidLibelleModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantEidLibelleModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; final SuggestListBoxSingleProperties<CaisseSimpleModel> slbCaisseProperties = new SuggestListBoxSingleProperties<CaisseSimpleModel>() { @Override public String getSelectSuggestRenderer(CaisseSimpleModel row) { return row == null ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(CaisseSimpleModel row) { return new String[] { row == null ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> propertiesRelation = 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() }; } }; lbSsReferents = new DecoratedSuggestListBoxSingle<IdentifiantEidLibelleModel>( slbIdentifiantEidLibelleProperties); tbNumSs = new DecoratedTextBox(); tbNumSs.setMaxLength(InfosAdhesionViewImplConstants.LONGUEUR_NUM_SECURITE_SOCIALE); tbCleSs = new DecoratedTextBox(); tbCleSs.setMaxLength(InfosAdhesionViewImplConstants.LONGUEUR_CLE_SECURITE_SOCIALE); tbCleSs.setWidth(InfosAdhesionViewImplConstants.LARGEUR_TB_CLE_SS); slbRelation = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(propertiesRelation); setRelationVisible(false); lbRegime = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); lbCaisse = new DecoratedSuggestListBoxSingle<CaisseSimpleModel>(slbCaisseProperties); cbTns = new CheckBox(); cbLoiMadelin = new CheckBox(); cbCouvertNow = new CheckBox(); cbCouvert6DerniersMois = new CheckBox(); final HorizontalPanel hpSecuSociale = new HorizontalPanel(); hpSecuSociale.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); hpSecuSociale.add(lbSsReferents); hpSecuSociale.add(new HTML(" ")); hpSecuSociale.add(tbNumSs); hpSecuSociale.add(new HTML(" ")); hpSecuSociale.add(construireBlocIcone(tbCleSs, "PersonneDto.numSecuriteSocial" + suffix)); final FlexTable flexTable = new FlexTable(); flexTable.setWidth(ComposantTarificateurConstants.POURCENT_100); flexTable.setCellSpacing(3); flexTable.setWidget(0, 0, lNumSs); flexTable.setWidget(0, 1, hpSecuSociale); flexTable.setWidget(1, 0, lRegime); flexTable.setWidget(1, 1, construireBlocIcone(lbRegime, "PersonneDto.eidRegime" + suffix)); flexTable.setWidget(1, 2, lCaisse); flexTable.setWidget(1, 3, construireBlocIcone(lbCaisse, "PersonneDto.eidCaisse" + suffix)); flexTable.setWidget(2, 0, lTns); flexTable.setWidget(2, 1, cbTns); flexTable.setWidget(2, 2, lLoiMadelin); flexTable.setWidget(2, 3, cbLoiMadelin); flexTable.setWidget(3, 0, lcouvertNow); flexTable.setWidget(3, 1, cbCouvertNow); flexTable.setWidget(3, 2, lcouvert6DerniersMois); flexTable.setWidget(3, 3, cbCouvert6DerniersMois); flexTable.setWidget(4, 0, lRelation); flexTable.setWidget(4, 1, construireBlocIcone(slbRelation, "RelationDto.type" + suffix)); flexTable.getFlexCellFormatter().setColSpan(0, 1, 3); flexTable.getColumnFormatter().setWidth(0, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_0); flexTable.getColumnFormatter().setWidth(1, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_1); flexTable.getColumnFormatter().setWidth(2, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_2); flexTable.getColumnFormatter().setWidth(3, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_3); panel = new CaptionPanel(); panel.add(flexTable); container.add(panel); }
From source file:com.square.composant.tarificateur.square.client.view.adhesion.BlocInfoSanteSimpleViewImpl.java
License:Open Source License
/** * Ajoute un panel contenant les informations d'un enfant. * @param enfant//from ww w .j a va 2 s . c o m */ private void construirePanel(String suffix) { final Label lNumSs = new Label(viewConstants.lNumSs()); final Label lRegime = new Label(viewConstants.lRegime()); final Label lCaisse = new Label(viewConstants.lCaisse()); lRelation = new Label(viewConstants.relation()); 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<IdentifiantEidLibelleModel> slbIdentifiantEidLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantEidLibelleModel>() { @Override public String getSelectSuggestRenderer(IdentifiantEidLibelleModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantEidLibelleModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; final SuggestListBoxSingleProperties<CaisseSimpleModel> slbCaisseProperties = new SuggestListBoxSingleProperties<CaisseSimpleModel>() { @Override public String getSelectSuggestRenderer(CaisseSimpleModel row) { return row == null ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(CaisseSimpleModel row) { return new String[] { row == null ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> propertiesRelation = 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() }; } }; lbSsReferents = new DecoratedSuggestListBoxSingle<IdentifiantEidLibelleModel>( slbIdentifiantEidLibelleProperties); tbNumSs = new DecoratedTextBox(); tbNumSs.setMaxLength(InfosAdhesionViewImplConstants.LONGUEUR_NUM_SECURITE_SOCIALE); tbCleSs = new DecoratedTextBox(); tbCleSs.setMaxLength(InfosAdhesionViewImplConstants.LONGUEUR_CLE_SECURITE_SOCIALE); tbCleSs.setWidth(InfosAdhesionViewImplConstants.LARGEUR_TB_CLE_SS); lbRegime = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); lbCaisse = new DecoratedSuggestListBoxSingle<CaisseSimpleModel>(slbCaisseProperties); slbRelation = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(propertiesRelation); setRelationVisible(false); final HorizontalPanel hpSecuSociale = new HorizontalPanel(); hpSecuSociale.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); hpSecuSociale.add(lbSsReferents); hpSecuSociale.add(new HTML(" ")); hpSecuSociale.add(tbNumSs); hpSecuSociale.add(new HTML(" ")); hpSecuSociale.add(construireBlocIcone(tbCleSs, "PersonneDto.numSecuriteSocial" + suffix)); final FlexTable flexTable = new FlexTable(); flexTable.setWidth(ComposantTarificateurConstants.POURCENT_100); flexTable.setCellSpacing(3); flexTable.setWidget(0, 0, lNumSs); flexTable.setWidget(0, 1, hpSecuSociale); flexTable.setWidget(1, 0, lRegime); flexTable.setWidget(1, 1, construireBlocIcone(lbRegime, "PersonneDto.eidRegime" + suffix)); flexTable.setWidget(1, 2, lCaisse); flexTable.setWidget(1, 3, construireBlocIcone(lbCaisse, "PersonneDto.eidCaisse" + suffix)); flexTable.setWidget(2, 0, lRelation); flexTable.setWidget(2, 1, construireBlocIcone(slbRelation, "RelationDto.type" + suffix)); flexTable.getFlexCellFormatter().setColSpan(0, 1, 3); flexTable.getColumnFormatter().setWidth(0, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_0); flexTable.getColumnFormatter().setWidth(1, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_1); flexTable.getColumnFormatter().setWidth(2, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_2); flexTable.getColumnFormatter().setWidth(3, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_3); panel = new CaptionPanel(); panel.add(flexTable); container.add(panel); }
From source file:com.square.composant.tarificateur.square.client.view.adhesion.InfosAdhesionViewImpl.java
License:Open Source License
/** * Construit le panel contenant les informations de paiement. *//*from w ww . j av a2s . c o m*/ private void construirePanelInfosPaiement() { final Label lDateSignature = new Label(viewConstants.labelDateSignature(), false); final Label lMontantPaiement = new Label(viewConstants.labelMontantPaiement(), false); final Label lNumeroTransaction = new Label(viewConstants.labelNumeroTransaction(), false); final Label lModePaiement = new Label(viewConstants.labelModePaiement(), false); final Label lPeriodicitePaiement = new Label(viewConstants.labelPeriodicitePaiement(), false); final Label lJourPaiement = new Label(viewConstants.labelJourPaiement(), false); final Label lRIB = new Label(viewConstants.lRib(), false); tbRibCodeBanque = new DecoratedTextBox(); tbRibCodeGuichet = new DecoratedTextBox(); tbRibCodeCompte = new DecoratedTextBox(); tbRibCle = new DecoratedTextBox(); lValeurMontantPaiement = new Label(); lValeurNumeroTransaction = new Label(); lbModesPaiement = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); lbPeriodicitesPaiement = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( slbIdentifiantLibelleProperties); lbJoursPaiement = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); calDateSignature = new DecoratedCalendrierDateBox(true); tbRibCodeBanque.setMaxLength(5); tbRibCodeGuichet.setMaxLength(5); tbRibCodeCompte.setMaxLength(11); tbRibCle.setMaxLength(2); tbRibCodeBanque.setWidth("45px"); tbRibCodeGuichet.setWidth("45px"); tbRibCodeCompte.setWidth("85px"); tbRibCle.setWidth("20px"); final HorizontalPanel conteneurRib = new HorizontalPanel(); conteneurRib.add(tbRibCodeBanque); conteneurRib.add(new HTML(" ")); conteneurRib.add(tbRibCodeGuichet); conteneurRib.add(new HTML(" ")); conteneurRib.add(tbRibCodeCompte); conteneurRib.add(new HTML(" ")); conteneurRib.add(tbRibCle); final FlexTable ftInfosPaiement = new FlexTable(); ftInfosPaiement.setWidth(ComposantTarificateurConstants.POURCENT_100); ftInfosPaiement.setCellSpacing(3); ftInfosPaiement.setWidget(0, 0, lDateSignature); ftInfosPaiement.setWidget(0, 1, construireBlocIcone(calDateSignature, "dateSignature")); ftInfosPaiement.setWidget(0, 2, lModePaiement); ftInfosPaiement.setWidget(0, 3, construireBlocIcone(lbModesPaiement, "idMoyenPaiement")); ftInfosPaiement.setWidget(1, 0, lMontantPaiement); ftInfosPaiement.setWidget(1, 1, lValeurMontantPaiement); ftInfosPaiement.setWidget(1, 2, lPeriodicitePaiement); ftInfosPaiement.setWidget(1, 3, construireBlocIcone(lbPeriodicitesPaiement, "idPeriodicitePaiement")); ftInfosPaiement.setWidget(2, 0, lNumeroTransaction); ftInfosPaiement.setWidget(2, 1, lValeurNumeroTransaction); ftInfosPaiement.setWidget(2, 2, lJourPaiement); ftInfosPaiement.setWidget(2, 3, construireBlocIcone(lbJoursPaiement, "idJourPaiement")); ftInfosPaiement.setWidget(3, 0, lRIB); ftInfosPaiement.setWidget(3, 1, construireBlocIcone(conteneurRib, "infosRib")); ftInfosPaiement.getFlexCellFormatter().setColSpan(3, 1, 3); ftInfosPaiement.getColumnFormatter().setWidth(0, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_0); ftInfosPaiement.getColumnFormatter().setWidth(1, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_1); ftInfosPaiement.getColumnFormatter().setWidth(2, InfosAdhesionViewImplConstants.LARGEUR_COL_LIBELLE_2); ftInfosPaiement.getColumnFormatter().setWidth(3, InfosAdhesionViewImplConstants.LARGEUR_COL_CHAMP_3); final CaptionPanel panelinfosPaiement = new CaptionPanel(viewConstants.captionPanelInfosPaiement()); panelinfosPaiement.add(ftInfosPaiement); container.add(panelinfosPaiement); // On incrmente le nombre de panel supplmentaires nbPanelSupplementaires++; }
From source file:com.threerings.gwt.ui.PagedWidget.java
License:Open Source License
protected void configureLoadingNavi(FlexTable controls, int row, int col) { Widget widget = getNowLoadingWidget(); if (widget != null) { controls.setWidget(row, col, widget); controls.getFlexCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER); }/*from ww w . j ava 2 s.c o m*/ _next.setEnabled(false); _prev.setEnabled(false); }
From source file:com.threerings.gwt.ui.PagedWidget.java
License:Open Source License
/** * Get the text that should be shown in the header bar between the "prev" and "next" buttons. */// w w w .j a v a 2 s .c o m protected void configureNavi(FlexTable controls, int row, int col, int start, int limit, int total) { HorizontalPanel panel = new HorizontalPanel(); panel.add(new Label("Page:")); // TODO: i18n // determine which pages we want to show int page = 1 + start / _resultsPerPage; int pages; if (total < 0) { pages = page + 1; } else { pages = total / _resultsPerPage + (total % _resultsPerPage == 0 ? 0 : 1); } List<Integer> shown = new ArrayList<Integer>(); shown.add(1); for (int ii = Math.max(2, Math.min(page - 2, pages - 5)); ii <= Math.min(pages - 1, Math.max(page + 2, 6)); ii++) { shown.add(ii); } if (pages != 1) { shown.add(pages); } // now display those as "Page: _1_ ... _3_ _4_ 5 _6_ _7_ ... _10_" int ppage = 0; for (Integer cpage : shown) { if (cpage - ppage > 1) { panel.add(createPageLabel("...", null)); } if (cpage == page) { panel.add(createPageLabel("" + page, "Current")); } else { panel.add(createPageLinkLabel(cpage)); } ppage = cpage; } if (total < 0) { panel.add(createPageLabel("...", null)); } controls.setWidget(row, col, panel); controls.getFlexCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER); }
From source file:com.totsp.gwittir.example.client.ContactEdit.java
License:Open Source License
/** Creates a new instance of ContactEdit */ public ContactEdit() { super();/*w w w .j ava 2 s . c om*/ super.initWidget(p); FlexTable base = new FlexTable(); base.setWidth("100%"); base.setStyleName("example-ContactEdit"); base.setWidget(0, 0, new Label("First Name:")); base.setWidget(0, 1, firstName); base.setWidget(1, 0, new Label("LastName:")); base.setWidget(1, 1, lastName); base.setWidget(2, 0, new Label("Notes:")); base.getFlexCellFormatter().setColSpan(2, 0, 2); base.setWidget(3, 0, notes); base.getFlexCellFormatter().setColSpan(3, 0, 2); p.add(base); p.add(new Label("Addresses:")); addressCols[0] = new Field("type", "Type"); addressCols[1] = new Field("address1", "Address"); addressCols[2] = new Field("address2", ""); addressCols[3] = new Field("city", "City"); addressCols[4] = new Field("state", "State"); addressCols[5] = new Field("zip", "Zip"); factory.add(StateLookup.class, new BoundWidgetProvider() { public BoundWidget get() { Label label = new Label(); label.setRenderer(new Renderer() { public Object render(Object o) { return (o == null) ? "" : ((StateLookup) o).code; } }); return label; } }); factory.add(TypeLookup.class, new BoundWidgetProvider() { public BoundWidget get() { TextBox label = new TextBox(); label.setRenderer(new Renderer() { public Object render(Object o) { return (o == null) ? "" : ((TypeLookup) o).name; } }); return label; } }); factory.add(String.class, BoundWidgetTypeFactory.LABEL_PROVIDER); factory.add(Address.class, new BoundWidgetProvider() { public BoundWidget get() { AddressEdit e = new AddressEdit(); e.setAction(new AddressEditAction()); return e; } }); addresses = new BoundTable(BoundTable.HEADER_MASK + BoundTable.SORT_MASK + BoundTable.NO_SELECT_CELL_MASK + BoundTable.NO_SELECT_COL_MASK//+ BoundTable.MULTIROWSELECT_MASK + BoundTable.INSERT_WIDGET_MASK, factory); addresses.setColumns(addressCols); addresses.setWidth("500px"); p.add(addresses); p.add(this.newAddress); p.add(new Label("Phone Numbers: ")); phoneCols[0] = new Field("type", "Type"); phoneCols[1] = new Field("number", "Number"); BoundWidgetTypeFactory phoneFactory = new BoundWidgetTypeFactory(true); phoneFactory.add(TypeLookup.class, TypeSelectorProvider.INSTANCE); this.phoneNumbers = new BoundTable(BoundTable.HEADER_MASK + BoundTable.SORT_MASK + BoundTable.NO_SELECT_CELL_MASK + BoundTable.NO_SELECT_COL_MASK, phoneFactory); phoneNumbers.setColumns(phoneCols); p.add(this.phoneNumbers); p.add(this.newPhone); }