List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable
public FlexTable()
From source file:com.square.client.gwt.client.view.action.moteur.recherche.ActionMoteurRechercheViewImpl.java
License:Open Source License
private Widget construireBlocInformation() { slbIdLibelleProperties = new SuggestListBoxCompositeProperties<IdentifiantLibelleGwt>() { @Override// ww w .j av a 2s . c o m public String getSuggestListBoxMultiplePopupTitle() { return viewConstants.titrePopUpSelection(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } @Override public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } @Override public Integer getLeftPosition() { return LEFT_POSITION_CENTER; } @Override public Integer getTopPosition() { return TOP_POSITION_CENTER; } }; slbStatut = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbStatut.ensureDebugId(viewDebugIdConstants.debugIdSlbStatut()); slbStatut.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbStatut = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_STATUT, isAdmin); final HorizontalPanel panelslbStatut = new HorizontalPanel(); panelslbStatut.setSpacing(5); panelslbStatut.add(slbStatut); panelslbStatut.add(aideslbStatut); ajouterAideComposant(aideslbStatut); slbNature = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbNature.ensureDebugId(viewDebugIdConstants.debugIdSlbNature()); slbNature.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbNature = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_NATURE, isAdmin); final HorizontalPanel panelslbNature = new HorizontalPanel(); panelslbNature.setSpacing(5); panelslbNature.add(slbNature); panelslbNature.add(aideslbNature); ajouterAideComposant(aideslbNature); slbResultat = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbResultat.ensureDebugId(viewDebugIdConstants.debugIdSlbResultat()); slbResultat.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbResultat = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_RESULTAT, isAdmin); final HorizontalPanel panelslbResultat = new HorizontalPanel(); panelslbResultat.setSpacing(5); panelslbResultat.add(slbResultat); panelslbResultat.add(aideslbResultat); ajouterAideComposant(aideslbResultat); slbPriorite = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbPriorite.ensureDebugId(viewDebugIdConstants.debugIdSlbPriorite()); slbPriorite.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbPriorite = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_PRIORITE, isAdmin); final HorizontalPanel panelslbPriorite = new HorizontalPanel(); panelslbPriorite.setSpacing(5); panelslbPriorite.add(slbPriorite); panelslbPriorite.add(aideslbPriorite); ajouterAideComposant(aideslbPriorite); slbNatureResultat = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbNatureResultat.ensureDebugId(viewDebugIdConstants.debugIdSlbNatureResultat()); slbNatureResultat.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbNatureResultat = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_NATURE_RESULTAT, isAdmin); final HorizontalPanel panelslbNatureResultat = new HorizontalPanel(); panelslbNatureResultat.setSpacing(5); panelslbNatureResultat.add(slbNatureResultat); panelslbNatureResultat.add(aideslbNatureResultat); ajouterAideComposant(aideslbNatureResultat); slbTypeCampagne = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbTypeCampagne.ensureDebugId(viewDebugIdConstants.debugIdSlbTypeCampagne()); slbTypeCampagne.setScrollPanelSuggestMultipleHeight( ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbTypeCampagne = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_TYPE_CAMPAGNE, isAdmin); final HorizontalPanel panelslbTypeCampagne = new HorizontalPanel(); panelslbTypeCampagne.setSpacing(5); panelslbTypeCampagne.add(slbTypeCampagne); panelslbTypeCampagne.add(aideslbTypeCampagne); ajouterAideComposant(aideslbTypeCampagne); cbReclamation = new CheckBox(); cbReclamation.ensureDebugId(viewDebugIdConstants.debugIdCbReclamation()); final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.information()); final FlexTable fpInformation = new FlexTable(); fpInformation.setCellSpacing(5); final Label statut = creerLibelle(viewConstants.statut()); final Label libelleCampagne = creerLibelle(viewConstants.libelleCampagne()); final Label nature = creerLibelle(viewConstants.nature()); final Label natureResultat = creerLibelle(viewConstants.natureResultat()); final Label resultat = creerLibelle(viewConstants.resultat()); final Label priorite = creerLibelle(viewConstants.priorite()); final Label reclamation = creerLibelle(viewConstants.reclamation()); final FlexTable fpanel = new FlexTable(); fpanel.setWidth(AppControllerConstants.POURCENT_100); fpanel.setCellSpacing(5); fpanel.setWidget(0, 0, statut); fpanel.setWidget(0, 1, panelslbStatut); fpanel.setWidget(0, 2, libelleCampagne); fpanel.setWidget(0, 3, panelslbTypeCampagne); fpanel.setWidget(1, 0, nature); fpanel.setWidget(1, 1, panelslbNature); fpanel.setWidget(1, 2, natureResultat); fpanel.setWidget(1, 3, panelslbNatureResultat); fpanel.setWidget(2, 0, resultat); fpanel.setWidget(2, 1, panelslbResultat); fpanel.setWidget(2, 2, priorite); fpanel.setWidget(2, 3, panelslbPriorite); fpanel.setWidget(3, 0, reclamation); fpanel.setWidget(3, 1, cbReclamation); slbStatut.setWidth("110px"); slbNature.setWidth("110px"); slbResultat.setWidth("110px"); fpanel.getColumnFormatter().setWidth(0, "3%"); fpanel.getColumnFormatter().setWidth(1, "25%"); fpanel.getColumnFormatter().setWidth(2, "16%"); fieldSetPanel.add(fpanel); return fieldSetPanel; }
From source file:com.square.client.gwt.client.view.action.transfert.ActionTransfertViewImpl.java
License:Open Source License
/** Construction du bloc de boutons. */ private void construireBlocListes() { // Agence/*from w w w . j a v a 2s.c o m*/ final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbAgenceProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } @Override public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } }; // Commercial final SuggestListBoxSingleProperties<DimensionRessourceModel> slbCommercialProperties = new SuggestListBoxSingleProperties<DimensionRessourceModel>() { @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(DimensionRessourceModel row) { return new String[] { row.getNom() + " " + row.getPrenom() }; } @Override public String getSelectSuggestRenderer(DimensionRessourceModel row) { return row == null ? "" : (row.getNom() + " " + row.getPrenom()); } }; final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.cibleTransfert()); slbAgence = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbAgenceProperties); slbAgence.ensureDebugId(viewDebugIdConstants.debugIdSlbAgence()); aideslbAgence = new AideComposant(AideComposantConstants.AIDE_ACTION_TRANSFERT_AGENCE, isAdmin); ajouterAideComposant(aideslbAgence); slbCommercial = new DecoratedSuggestListBoxSingle<DimensionRessourceModel>(slbCommercialProperties); slbCommercial.ensureDebugId(viewDebugIdConstants.debugIdSlbCommercial()); aideslbCommercial = new AideComposant(AideComposantConstants.AIDE_ACTION_TRANSFERT_COMMERCIAL, isAdmin); ajouterAideComposant(aideslbCommercial); final HorizontalPanel panelslbCommercial = new HorizontalPanel(); panelslbCommercial.setSpacing(5); panelslbCommercial.add(slbCommercial); panelslbCommercial.add(aideslbCommercial); final FlexTable fpInformation = new FlexTable(); fpInformation.setWidth(AppControllerConstants.POURCENT_100); fpInformation.setCellPadding(5); final Label agence = creerLibelle(viewConstants.agence()); final Label commercial = creerLibelle(viewConstants.commercial()); fpInformation.setWidget(0, 0, agence); fpInformation.setWidget(0, 1, construireBlocIcone(slbAgence, "ActionRechercheDto.agence.id", aideslbAgence)); fpInformation.setWidget(1, 0, commercial); fpInformation.setWidget(1, 1, panelslbCommercial); fpInformation.getColumnFormatter().setWidth(0, ActionTransfertViewImplConstants.LARGEUR_COL_LIBELLE); fieldSetPanel.add(fpInformation); conteneurGlobal.add(fieldSetPanel); }
From source file:com.square.client.gwt.client.view.campagne.creation.CampagneCreationViewImpl.java
License:Open Source License
/** Construit le panel avec les informations de cration. */ private void construireBlocCreation() { conteneurInfos = new VerticalPanel(); conteneurInfos.setSpacing(10);//w w w . j av a2 s.c o m tbLibelle = new DecoratedTextBox(); aideTbLibelle = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_CREATION_LIBELLE, isAdmin); ajouterAideComposant(aideTbLibelle); tbLibelle.ensureDebugId(viewDebugIdConstants.debugIdTbLibelle()); 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() }; } }; slbType = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbType.ensureDebugId(viewDebugIdConstants.debugIdSlbType()); aideSlbType = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_CREATION_TYPE, isAdmin); ajouterAideComposant(aideSlbType); cdbDateDebut = new DecoratedCalendrierDateBox(true); cdbDateDebut.ensureDebugId(viewDebugIdConstants.debugIdCdbDateDebut()); aideCdbDateDebut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_CREATION_DATE_DEBUT, isAdmin); ajouterAideComposant(aideCdbDateDebut); cdbDateFin = new DecoratedCalendrierDateBox(true); cdbDateFin.ensureDebugId(viewDebugIdConstants.debugIdCdbDateFin()); aideCdbDateFin = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_CREATION_DATE_FIN, isAdmin); ajouterAideComposant(aideCdbDateFin); final CaptionPanel captionPanel = new CaptionPanel(viewConstants.infoBloc()); final FlexTable flexTable = new FlexTable(); flexTable.setWidget(0, 0, new Label(viewConstants.libelle())); flexTable.setWidget(0, 1, construireBlocIcone(tbLibelle, "CampagneDto.libelle", aideTbLibelle)); flexTable.setWidget(1, 0, new Label(viewConstants.type())); flexTable.setWidget(1, 1, construireBlocIcone(slbType, "CampagneDto.type", aideSlbType)); flexTable.setWidget(2, 0, new Label(viewConstants.dateDebut())); flexTable.setWidget(2, 1, construireBlocIcone(cdbDateDebut, "CampagneDto.dateDebut", aideCdbDateDebut)); flexTable.setWidget(3, 0, new Label(viewConstants.dateFin())); flexTable.setWidget(3, 1, construireBlocIcone(cdbDateFin, "CampagneDto.dateFin", aideCdbDateFin)); flexTable.setCellSpacing(5); flexTable.setWidth(AppControllerConstants.POURCENT_100); captionPanel.add(flexTable); conteneurInfos.add(captionPanel); }
From source file:com.square.client.gwt.client.view.campagne.gestion.CampagneGestionViewImpl.java
License:Open Source License
private void construirePage() { final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override// w w w . ja va2s.c o m 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() }; } }; lCode = new Label(); lCreateur = new Label(); tbLibelle = new DecoratedTextBox(); aideTbLibelle = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_LIBELLE, isAdmin); HorizontalPanel paneltbLibelle = new HorizontalPanel(); paneltbLibelle.setSpacing(5); paneltbLibelle.add(tbLibelle); paneltbLibelle.add(aideTbLibelle); ajouterAideComposant(aideTbLibelle); slbStatut = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); aideSlbStatut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_STATUT, isAdmin); ajouterAideComposant(aideSlbStatut); lType = new Label(); cdbDateDebut = new DecoratedCalendrierDateBox(true); aideCdbDateDebut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_DATE_DEBUT, isAdmin); ajouterAideComposant(aideCdbDateDebut); cdbDateFin = new DecoratedCalendrierDateBox(true); aideCdbDateFin = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_DATE_FIN, isAdmin); ajouterAideComposant(aideCdbDateFin); taDescriptif = new HTML(); taDescriptif.addStyleName(SquareResources.INSTANCE.css().descriptifReadOnly()); taDescriptif.setVisible(false); aidetaDescriptif = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_DESCRIPTIF, isAdmin); ajouterAideComposant(aidetaDescriptif); rtaDescriptif = new RichTextArea(); rtaDescriptif.setWidth(AppControllerConstants.POURCENT_100); aidertaDescriptif = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_DECRIPTIF_BIS, isAdmin); ajouterAideComposant(aidertaDescriptif); rttToolbar = new RichTextToolbar(rtaDescriptif, RichTextToolbar.MODE_EXTENDED); rttToolbar.setWidth(AppControllerConstants.POURCENT_100); aiderttToolbar = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_TOOLBAR, isAdmin); ajouterAideComposant(aiderttToolbar); rtpCommmentaire = new RichTextPanel(rttToolbar, rtaDescriptif); rtpCommmentaire.setWidth(AppControllerConstants.POURCENT_100); aidertpCommmentaire = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_GESTION_COMMENTAIRE, isAdmin); btnAnnuler = new DecoratedButton(viewConstants.annuler()); btnEnregistrer = new DecoratedButton(viewConstants.enregistrer()); final CaptionPanel captionPanelInformation = new CaptionPanel(viewConstants.informations()); final FlexTable conteneurInformations = new FlexTable(); conteneurInformations.setWidth(AppControllerConstants.POURCENT_100); conteneurInformations.setWidget(0, 0, new Label(viewConstants.code(), false)); conteneurInformations.setWidget(0, 1, lCode); conteneurInformations.setWidget(0, 2, new Label(viewConstants.libelle(), false)); conteneurInformations.setWidget(0, 3, paneltbLibelle); conteneurInformations.setWidget(1, 0, new Label(viewConstants.statut(), false)); conteneurInformations.setWidget(1, 1, construireBlocIcone(slbStatut, "CampagneDto.statut", aideSlbStatut)); conteneurInformations.setWidget(1, 2, new Label(viewConstants.type(), false)); conteneurInformations.setWidget(1, 3, lType); conteneurInformations.setWidget(1, 4, new Label(viewConstants.createur(), false)); conteneurInformations.setWidget(1, 5, lCreateur); conteneurInformations.setWidget(2, 0, new Label(viewConstants.dateDebut(), false)); conteneurInformations.setWidget(2, 1, construireBlocIcone(cdbDateDebut, "CampagneDto.dateDebut", aideCdbDateDebut)); conteneurInformations.setWidget(2, 2, new Label(viewConstants.dateFin(), false)); conteneurInformations.setWidget(2, 3, construireBlocIcone(cdbDateFin, "CampagneDto.dateFin", aideCdbDateFin)); conteneurInformations.getColumnFormatter().setWidth(0, "10%"); conteneurInformations.getColumnFormatter().setWidth(1, "27%"); conteneurInformations.getColumnFormatter().setWidth(2, "8%"); conteneurInformations.getColumnFormatter().setWidth(3, "27%"); conteneurInformations.getColumnFormatter().setWidth(4, "8%"); conteneurInformations.getColumnFormatter().setWidth(5, "20%"); captionPanelInformation.add(conteneurInformations); // Contruction de la zone de text final CaptionPanel captionPanelDescription = new CaptionPanel(viewConstants.description()); final Grid grid = new Grid(3, 1); grid.setWidget(0, 0, rtpCommmentaire); grid.setWidget(2, 0, taDescriptif); grid.setWidth(AppControllerConstants.POURCENT_100); captionPanelDescription.add(grid); // Construction de la bare de bouton final HorizontalPanel horizontalPanelBoutons = new HorizontalPanel(); horizontalPanelBoutons.add(btnEnregistrer); horizontalPanelBoutons.add(btnAnnuler); horizontalPanelBoutons.setSpacing(5); conteneur.add(captionPanelInformation); conteneur.add(captionPanelDescription); conteneur.add(horizontalPanelBoutons); conteneur.setCellHorizontalAlignment(horizontalPanelBoutons, HasAlignment.ALIGN_RIGHT); }
From source file:com.square.client.gwt.client.view.campagne.moteur.recherche.CampagneMoteurRechercheViewImpl.java
License:Open Source License
/** * Constructeur.// w w w .java2 s. co m * @param appConstantes les appConstantes. */ public CampagneMoteurRechercheViewImpl(AppControllerConstants appConstantes, boolean isAdmin) { this.focusPanel = new FocusPanel(); this.appConstantes = appConstantes; this.isAdmin = isAdmin; conteneur = new VerticalPanel(); conteneur.setWidth(AppControllerConstants.POURCENT_100); conteneur.setSpacing(10); AideComposant aideView = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_GLOBAL, isAdmin); ajouterAideComposant(aideView); conteneur.add(aideView); conteneur.setCellHorizontalAlignment(aideView, HasAlignment.ALIGN_RIGHT); construireBlocRecherche(); // Construction de la ligne avec le bouton btnRechercher = new DecoratedButton(viewConstants.libelleBtnRechercher()); btnRechercher.ensureDebugId(viewDebugIdConstants.debugIdBtnRechercher()); btnEffacerRecherche = new DecoratedButton(viewConstants.effacer()); btnEffacerRecherche.ensureDebugId(viewDebugIdConstants.debugIdBtnEffacerRecherche()); final FlexTable conteneurButtons = new FlexTable(); conteneurButtons.setCellSpacing(5); conteneurButtons.setWidget(0, 0, btnRechercher); conteneurButtons.setWidget(0, 1, btnEffacerRecherche); conteneur.add(conteneurButtons); conteneur.setCellHorizontalAlignment(conteneurButtons, HasAlignment.ALIGN_CENTER); construireBlocResultat(); creerExportExcel(); focusPanel.add(new ContenuOnglet(conteneur)); this.initWidget(focusPanel); this.setWidth(AppControllerConstants.POURCENT_100); this.addStyleName(SquareResources.INSTANCE.css().campagneMoteurRecherche()); }
From source file:com.square.client.gwt.client.view.campagne.moteur.recherche.CampagneMoteurRechercheViewImpl.java
License:Open Source License
private void construireBlocRecherche() { slbIdLibelleProperties = new SuggestListBoxCompositeProperties<IdentifiantLibelleGwt>() { @Override//from w w w . j a va 2 s. c om public String getSuggestListBoxMultiplePopupTitle() { return viewConstants.titrePopUpSelection(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleGwt row) { return new String[] { row == null ? "" : row.getLibelle() }; } @Override public String getSelectSuggestRenderer(IdentifiantLibelleGwt row) { return row == null ? "" : row.getLibelle(); } @Override public Integer getLeftPosition() { return LEFT_POSITION_CENTER; } @Override public Integer getTopPosition() { return TOP_POSITION_CENTER; } }; tbCode = new DecoratedTextBoxFormat("NNNNNNNNNN"); tbCode.ensureDebugId(viewDebugIdConstants.debugIdTbCode()); aidetbCode = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_CODE, isAdmin); HorizontalPanel paneltbCode = new HorizontalPanel(); paneltbCode.setSpacing(5); paneltbCode.add(tbCode); paneltbCode.add(aidetbCode); ajouterAideComposant(aidetbCode); tbLibelle = new DecoratedTextBox(); tbLibelle.ensureDebugId(viewDebugIdConstants.debugIdTbLibelle()); aidetbLibelle = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_LIBELLE, isAdmin); HorizontalPanel paneltbLibelle = new HorizontalPanel(); paneltbLibelle.setSpacing(5); paneltbLibelle.add(tbLibelle); paneltbLibelle.add(aidetbLibelle); ajouterAideComposant(aidetbLibelle); slbType = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbType.ensureDebugId(viewDebugIdConstants.debugIdSlbType()); slbType.setScrollPanelSuggestMultipleHeight( CampagneMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbType = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_TYPE, isAdmin); HorizontalPanel panelslbType = new HorizontalPanel(); panelslbType.setSpacing(5); panelslbType.add(slbType); panelslbType.add(aideslbType); ajouterAideComposant(aideslbType); slbStatut = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(slbIdLibelleProperties); slbStatut.ensureDebugId(viewDebugIdConstants.debugIdSlbStatut()); slbStatut.setScrollPanelSuggestMultipleHeight( CampagneMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE); aideslbStatut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_STATUT, isAdmin); HorizontalPanel panelslbStatut = new HorizontalPanel(); panelslbStatut.setSpacing(5); panelslbStatut.add(slbStatut); panelslbStatut.add(aideslbStatut); ajouterAideComposant(aideslbStatut); cdbDateInfDateDebut = new DecoratedCalendrierDateBox(); cdbDateInfDateDebut.ensureDebugId(viewDebugIdConstants.debugIdCdbDateInfDateDebut()); aidecdbDateInfDateDebut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_DATE_INF_DEBUT, isAdmin); HorizontalPanel panelcdbDateInfDateDebut = new HorizontalPanel(); panelcdbDateInfDateDebut.setSpacing(5); panelcdbDateInfDateDebut.add(cdbDateInfDateDebut); panelcdbDateInfDateDebut.add(aidecdbDateInfDateDebut); ajouterAideComposant(aidecdbDateInfDateDebut); cdbDateSupDateDebut = new DecoratedCalendrierDateBox(); cdbDateSupDateDebut.ensureDebugId(viewDebugIdConstants.debugIdCdbDateSupDateDebut()); aidecdbDateSupDateDebut = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_DATE_SUP_DEBUT, isAdmin); HorizontalPanel panelcdbDateSupDateDebut = new HorizontalPanel(); panelcdbDateSupDateDebut.setSpacing(5); panelcdbDateSupDateDebut.add(cdbDateSupDateDebut); panelcdbDateSupDateDebut.add(aidecdbDateSupDateDebut); ajouterAideComposant(aidecdbDateSupDateDebut); cdbDateInfDateFin = new DecoratedCalendrierDateBox(); cdbDateInfDateFin.ensureDebugId(viewDebugIdConstants.debugIdCdbDateInfDateFin()); aidecdbDateInfDateFin = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_DATE_INF_FIN, isAdmin); HorizontalPanel panelcdbDateInfDateFin = new HorizontalPanel(); panelcdbDateInfDateFin.setSpacing(5); panelcdbDateInfDateFin.add(cdbDateInfDateFin); panelcdbDateInfDateFin.add(aidecdbDateInfDateFin); ajouterAideComposant(aidecdbDateInfDateFin); cdbDateSupDateFin = new DecoratedCalendrierDateBox(); cdbDateSupDateFin.ensureDebugId(viewDebugIdConstants.debugIdCdbDateSupDateFin()); aidecdbDateInfDateFin = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_DATE_SUP_FIN, isAdmin); HorizontalPanel panelcdbDateSupDateFin = new HorizontalPanel(); panelcdbDateSupDateFin.setSpacing(5); panelcdbDateSupDateFin.add(cdbDateSupDateFin); panelcdbDateSupDateFin.add(aidecdbDateInfDateFin); ajouterAideComposant(aidecdbDateInfDateFin); final SuggestListBoxSingleProperties<DimensionRessourceModel> properties = new SuggestListBoxSingleProperties<DimensionRessourceModel>() { @Override public String getSelectSuggestRenderer(DimensionRessourceModel row) { return row == null ? "" : row.getNom() + " " + row.getPrenom(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(DimensionRessourceModel row) { return new String[] { row == null ? "" : row.getNom() + " " + row.getPrenom() }; } }; slbCreateur = new DecoratedSuggestListBoxSingle<DimensionRessourceModel>(properties); slbCreateur.ensureDebugId(viewDebugIdConstants.debugIdSlbCreateur()); aideslbCreateur = new AideComposant(AideComposantConstants.AIDE_CAMPAGNE_RECHERCHE_CREATEUR, isAdmin); HorizontalPanel panelslbCreateur = new HorizontalPanel(); panelslbCreateur.setSpacing(5); panelslbCreateur.add(slbCreateur); panelslbCreateur.add(aideslbCreateur); ajouterAideComposant(aideslbCreateur); final CaptionPanel captionPanel = new CaptionPanel(viewConstants.recherche()); final FlexTable fpRechercher = new FlexTable(); fpRechercher.setWidth(AppControllerConstants.POURCENT_100); fpRechercher.setCellSpacing(5); final Label code = creerLibelle(viewConstants.code()); final Label libelle = creerLibelle(viewConstants.libelle()); final Label type = creerLibelle(viewConstants.type()); final Label statut = creerLibelle(viewConstants.statut()); final Label libelleDateDebut = creerLibelle(viewConstants.libelleDateDebut()); final Label libelleDateFin = creerLibelle(viewConstants.libelleDateFin()); final Label createur = creerLibelle(viewConstants.createur()); final Label auDateDebut = creerLibelle(viewConstants.au()); final Label auDateFin = creerLibelle(viewConstants.au()); final HorizontalPanel conteneurDateDebut = new HorizontalPanel(); conteneurDateDebut.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE); conteneurDateDebut.add(panelcdbDateInfDateDebut); conteneurDateDebut.add(new HTML(" ")); conteneurDateDebut.add(auDateDebut); conteneurDateDebut.add(new HTML(" ")); conteneurDateDebut.add(panelcdbDateSupDateDebut); final HorizontalPanel conteneurDateFin = new HorizontalPanel(); conteneurDateFin.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE); conteneurDateFin.add(panelcdbDateInfDateFin); conteneurDateFin.add(new HTML(" ")); conteneurDateFin.add(auDateFin); conteneurDateFin.add(new HTML(" ")); conteneurDateFin.add(panelcdbDateSupDateFin); fpRechercher.setWidget(0, 0, code); fpRechercher.setWidget(0, 1, paneltbCode); fpRechercher.setWidget(0, 2, libelle); fpRechercher.setWidget(0, 3, paneltbLibelle); fpRechercher.setWidget(1, 0, type); fpRechercher.setWidget(1, 1, panelslbType); fpRechercher.setWidget(1, 2, statut); fpRechercher.setWidget(1, 3, panelslbStatut); fpRechercher.setWidget(2, 0, libelleDateDebut); fpRechercher.setWidget(2, 1, conteneurDateDebut); fpRechercher.setWidget(2, 2, libelleDateFin); fpRechercher.setWidget(2, 3, conteneurDateFin); fpRechercher.setWidget(3, 0, createur); fpRechercher.setWidget(3, 1, panelslbCreateur); fpRechercher.getColumnFormatter().setWidth(0, CampagneMoteurRechercheViewImplConstants.LARGEUR_COL_LIBELLE); fpRechercher.getColumnFormatter().setWidth(1, CampagneMoteurRechercheViewImplConstants.LARGEUR_COL_CHAMP); fpRechercher.getColumnFormatter().setWidth(2, CampagneMoteurRechercheViewImplConstants.LARGEUR_COL_LIBELLE); fpRechercher.getColumnFormatter().setWidth(3, CampagneMoteurRechercheViewImplConstants.LARGEUR_COL_CHAMP); captionPanel.add(fpRechercher); conteneur.add(captionPanel); }
From source file:com.square.client.gwt.client.view.personne.action.PersonneActionContenuViewImpl.java
License:Open Source License
/** Constructeur. */ public PersonneActionContenuViewImpl(boolean isAdmin) { constants = (PersonneActionContenuViewImplConstants) GWT .create(PersonneActionContenuViewImplConstants.class); this.isAdmin = isAdmin; viewDebudIdConstants = (PersonneActionContenuViewImplDebugIdConstants) GWT .create(PersonneActionContenuViewImplDebugIdConstants.class); iconeErreurChampManager = new IconeErreurChampManager(); flexTable = new FlexTable(); flexTable.setWidth(AppControllerConstants.POURCENT_100); flexTable.setCellSpacing(5);//from ww w . ja va 2 s. co m // Construction du bandeau Affectation / Campagne constructionAffectationCampagne(); // Construction du bandeau de notification constructionNotification(); // Construction du bandeau GED conteneurGed = new CaptionPanel(constants.titreGed()); flexTable.setWidget(2, 0, conteneurGed); flexTable.getFlexCellFormatter().setColSpan(2, 0, 2); // Construction du bloc action constructionAction(); initWidget(flexTable); }
From source file:com.square.client.gwt.client.view.personne.action.PersonneActionContenuViewImpl.java
License:Open Source License
private void constructionAffectationCampagne() { // Partie affectation final CaptionPanel captionAffectation = new CaptionPanel(constants.titreCaptionAffectation()); captionAffectation.setHeight("120px"); final FlexTable flexTableAffectation = new FlexTable(); lCreateur = new Label(); lDateCreation = new Label(); lAgence = new Label(); slbAttributionAgence = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>( new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() { @Override//www . j a v a 2 s. c o m 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() }; } }); slbAttributionAgence.ensureDebugId(viewDebudIdConstants.debugIdSlbAttributionAgence()); lRessourceAgence = new Label(); slbAttributionRessourceAgence = new DecoratedSuggestListBoxSingle<DimensionRessourceModel>( new SuggestListBoxSingleProperties<DimensionRessourceModel>() { @Override public String getSelectSuggestRenderer(DimensionRessourceModel row) { return row == null ? "" : row.getNom() + " " + row.getPrenom(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(DimensionRessourceModel row) { return new String[] { row == null ? "" : row.getNom(), row.getPrenom() }; } }); slbAttributionRessourceAgence.ensureDebugId(viewDebudIdConstants.debugIdSlbAttributionRessourceAgence()); final HorizontalPanel panelAttributionAgence = new HorizontalPanel(); panelAttributionAgence.add(lAgence); panelAttributionAgence.add(slbAttributionAgence); final HorizontalPanel panelRessourceAgence = new HorizontalPanel(); panelRessourceAgence.add(lRessourceAgence); panelRessourceAgence.add(slbAttributionRessourceAgence); flexTableAffectation.setWidget(0, 0, new Label(constants.libelleCreateur())); flexTableAffectation.setWidget(0, 1, lCreateur); flexTableAffectation.setWidget(1, 0, new Label(constants.libelleAgence())); flexTableAffectation.setWidget(1, 1, panelAttributionAgence); flexTableAffectation.setWidget(2, 0, new Label(constants.libelleAttributionRessourceAgence())); flexTableAffectation.setWidget(2, 1, panelRessourceAgence); flexTableAffectation.setWidget(3, 0, new Label(constants.libelleDateCreation())); flexTableAffectation.setWidget(3, 1, lDateCreation); flexTableAffectation.setCellSpacing(5); captionAffectation.add(flexTableAffectation); // Partie campagne final CaptionPanel captionCampagne = new CaptionPanel(constants.titreCaptionCampagne()); captionCampagne.setHeight("120px"); final FlexTable flexTableCampagne = new FlexTable(); lCampagne = new Label(); flexTableCampagne.setWidget(0, 0, new Label(constants.libelleCampagne())); flexTableCampagne.setWidget(0, 1, lCampagne); flexTableCampagne.setCellSpacing(5); captionCampagne.add(flexTableCampagne); // Ajout des partie au panel flexTable.setWidget(0, 0, captionAffectation); flexTable.setWidget(0, 1, captionCampagne); flexTable.getCellFormatter().setWidth(0, 0, "50%"); flexTable.getCellFormatter().setWidth(0, 1, "50%"); }
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 w w w . ja va2s.co m*/ 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
private Widget construireBlocType(int index, SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties) { final Label lbType = new Label(adresseCreationConstantes.type(), false); slbType = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); slbType.ensureDebugId(viewDebugIdConstants.debugIdSlbType()); aideslbType = new AideComposant(AideComposantConstants.AIDE_PERSONNE_COORDONNEES_CREATION_TYPE, isAdmin); ajouterAideComposant(aideslbType);/*from ww w . j av a2 s . co m*/ // panelslbType = new HorizontalPanel(); // panelslbType.setSpacing(4); // panelslbType.add(slbType); // panelslbType.add(aideslbType); final FlexTable flexTable = new FlexTable(); flexTable.setWidth(AppControllerConstants.POURCENT_100); flexTable.setCellSpacing(3); flexTable.setWidget(0, 0, lbType); flexTable.setWidget(0, 1, construireBlocIcone(slbType, "AdresseDto.nature." + index, aideslbType)); flexTable.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE_0); conteneurType = new VerticalPanel(); conteneurType.setWidth(AppControllerConstants.POURCENT_100); conteneurType.add(flexTable); final CaptionPanel captionPanel = new CaptionPanel(adresseCreationConstantes.typeAdresse()); captionPanel.add(conteneurType); return captionPanel; }