Example usage for com.google.gwt.user.client.ui HorizontalPanel setSpacing

List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setSpacing

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui HorizontalPanel setSpacing.

Prototype

public void setSpacing(int spacing) 

Source Link

Document

Sets the amount of spacing between this panel's cells.

Usage

From source file:com.square.client.gwt.client.view.action.creation.ActionCreationViewImpl.java

License:Open Source License

/** Construction du bloc campagne. */
private void construireBlocCampagne() {
    final Label lcampagne = new Label(viewConstants.campagne(), false);
    final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() {
        @Override/*  w ww  .  j  av a2s .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() };
        }
    };
    slbCampagne = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbCampagne.ensureDebugId(viewDebugIdConstants.debugIdSlbCampagne());
    aideSlbCampagne = new AideComposant(AideComposantConstants.AIDE_ACTION_CREATION_CAMPAGNE, isAdmin);
    HorizontalPanel panelSlbCampagne = new HorizontalPanel();
    panelSlbCampagne.setSpacing(5);
    panelSlbCampagne.add(slbCampagne);
    panelSlbCampagne.add(aideSlbCampagne);
    ajouterAideComposant(aideSlbCampagne);
    final CaptionPanel captionPanel = new CaptionPanel(viewConstants.libellePanelCampagne());
    final FlexTable flexTable = new FlexTable();
    flexTable.setWidth(AppControllerConstants.POURCENT_100);
    flexTable.setCellSpacing(3);
    flexTable.setWidget(0, 0, lcampagne);
    flexTable.setWidget(0, 1, panelSlbCampagne);
    flexTable.getColumnFormatter().setWidth(0, ActionCreationViewImplConstants.LARGEUR_COL_LIBELLE);

    captionPanel.add(flexTable);
    conteneurGlobal.add(captionPanel);
}

From source file:com.square.client.gwt.client.view.action.creation.ActionCreationViewImpl.java

License:Open Source License

/** Construction du bloc de notification. */
private void construireBlocNotification() {
    // Constuction de la ligne de rappel
    cbRappelNotification = new CheckBox();
    aidecbRappelNotification = new AideComposant(
            AideComposantConstants.AIDE_ACTION_CREATION_RAPPEL_NOTIFICATION, isAdmin);
    ajouterAideComposant(aidecbRappelNotification);

    cbRappelNotification.ensureDebugId(viewDebugIdConstants.debugIdCbRappelNotification());
    final Label lrappeler = new Label(viewConstants.rappeler());
    lbNotification = new ListBox();
    lbNotification.ensureDebugId(viewDebugIdConstants.debugIdLbNotification());
    final Label lavant = new Label(viewConstants.avant());
    final HorizontalPanel horizontalPanelLigne1 = new HorizontalPanel();
    horizontalPanelLigne1.add(aidecbRappelNotification);
    horizontalPanelLigne1.add(cbRappelNotification);
    horizontalPanelLigne1.add(lrappeler);
    horizontalPanelLigne1.add(lbNotification);
    horizontalPanelLigne1.add(lavant);// w  ww  .  j a v a2 s  .  co  m
    horizontalPanelLigne1.setCellVerticalAlignment(lrappeler, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne1.setCellVerticalAlignment(lavant, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne1.setCellVerticalAlignment(aidecbRappelNotification, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne1.setSpacing(2);
    // Construction de la ligne rappel par mail
    final HorizontalPanel horizontalPanelLigne2 = new HorizontalPanel();
    cbRappelMail = new CheckBox();
    aidecbRappelMail = new AideComposant(AideComposantConstants.AIDE_ACTION_CREATION_RAPPEL_MAIL, isAdmin);
    ajouterAideComposant(aidecbRappelMail);
    horizontalPanelLigne2.add(aidecbRappelMail);
    horizontalPanelLigne2.add(cbRappelMail);
    cbRappelMail.ensureDebugId(viewDebugIdConstants.debugIdCbRappelMail());
    final Label libelleRappelMail = new Label(viewConstants.rappelMail());
    horizontalPanelLigne2.add(libelleRappelMail);
    horizontalPanelLigne2.setCellVerticalAlignment(libelleRappelMail, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne2.setCellVerticalAlignment(aidecbRappelMail, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne2.setSpacing(2);

    // Construction de la ligne d'ajout  l'agenda
    final HorizontalPanel horizontalPanelLigne3 = new HorizontalPanel();
    cbAjouterAgenda = new CheckBox();
    cbAjouterAgenda.setEnabled(false);
    aideCbAjouterAgenda = new AideComposant(100014L, isAdmin);
    ajouterAideComposant(aideCbAjouterAgenda);
    horizontalPanelLigne3.add(aideCbAjouterAgenda);
    horizontalPanelLigne3.add(cbAjouterAgenda);
    cbAjouterAgenda.ensureDebugId(viewDebugIdConstants.debugIdCbAjouterAgenda());
    final Label libelleAjouterAgenda = new Label(viewConstants.ajouterAgenda());
    horizontalPanelLigne3.add(libelleAjouterAgenda);
    horizontalPanelLigne3.setCellVerticalAlignment(libelleRappelMail, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne3.setCellVerticalAlignment(aidecbRappelMail, HasAlignment.ALIGN_MIDDLE);
    horizontalPanelLigne3.setSpacing(2);

    final CaptionPanel captionPanel = new CaptionPanel(viewConstants.libellePanelNotification());
    final VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.add(horizontalPanelLigne1);
    verticalPanel.add(horizontalPanelLigne2);
    verticalPanel.add(horizontalPanelLigne3);

    captionPanel.add(verticalPanel);
    conteneurGlobal.add(captionPanel);
}

From source file:com.square.client.gwt.client.view.action.creation.ActionCreationViewImpl.java

License:Open Source License

/** Construction du bloc de boutons. */
private HorizontalPanel construireBlocBouton() {
    final HorizontalPanel horizontalPanel = new HorizontalPanel();
    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());
    horizontalPanel.add(btnCreer);//w  w w .ja  va  2  s.c o m
    horizontalPanel.add(btnReduire);
    horizontalPanel.add(btnAnnuler);
    horizontalPanel.setSpacing(5);
    return horizontalPanel;
}

From source file:com.square.client.gwt.client.view.action.moteur.recherche.ActionMoteurRechercheViewImpl.java

License:Open Source License

private Widget construireBlocIdentification() {
    final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() {

        @Override/*from w w w.  j a 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() };
        }
    };
    slbType = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbType.ensureDebugId(viewDebugIdConstants.debugIdSlbType());
    aideslbType = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_TYPE, isAdmin);
    final HorizontalPanel panelslbType = new HorizontalPanel();
    panelslbType.setSpacing(5);
    panelslbType.add(slbType);
    panelslbType.add(aideslbType);
    ajouterAideComposant(aideslbType);

    slbObjet = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbObjet.ensureDebugId(viewDebugIdConstants.debugIdSlbObjet());
    aideslbObjet = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_OBJET, isAdmin);
    final HorizontalPanel panelslbObjet = new HorizontalPanel();
    panelslbObjet.setSpacing(5);
    panelslbObjet.add(slbObjet);
    panelslbObjet.add(aideslbObjet);
    ajouterAideComposant(aideslbObjet);

    slbSousObjet = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbSousObjet.ensureDebugId(viewDebugIdConstants.debugIdSlbSousObjet());
    aideslbSousObjet = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_SOUS_OBJET, isAdmin);
    final HorizontalPanel panelslbSousObjet = new HorizontalPanel();
    panelslbSousObjet.setSpacing(5);
    panelslbSousObjet.add(slbSousObjet);
    panelslbSousObjet.add(aideslbSousObjet);
    ajouterAideComposant(aideslbSousObjet);

    final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.identificaton());
    fieldSetPanel.setHeight(ActionsMoteurRechercheViewImplConstants.HAUTEUR_BLOC);

    final FlexTable fpIdentification = new FlexTable();
    fpIdentification.setCellSpacing(5);
    final Label type = creerLibelle(viewConstants.type());
    final Label objet = creerLibelle(viewConstants.objet());
    final Label sousObjet = creerLibelle(viewConstants.sousObjet());

    fpIdentification.setWidget(0, 0, type);
    fpIdentification.setWidget(0, 1, panelslbType);
    fpIdentification.setWidget(1, 0, objet);
    fpIdentification.setWidget(1, 1, panelslbObjet);
    fpIdentification.setWidget(2, 0, sousObjet);
    fpIdentification.setWidget(2, 1, panelslbSousObjet);

    fpIdentification.getColumnFormatter().setWidth(0, "25%");
    fieldSetPanel.add(fpIdentification);
    fieldSetPanel.setHeight("200px");
    return fieldSetPanel;
}

From source file:com.square.client.gwt.client.view.action.moteur.recherche.ActionMoteurRechercheViewImpl.java

License:Open Source License

/**
 * Construit le bloc "cration".//from ww w  . j a  v a  2 s .c  om
 * @return le bloc gnr.
 */
private Widget construireBlocCreation() {
    slbCreateur = new DecoratedSuggestListBoxComposite<DimensionRessourceModel>(
            new SuggestListBoxCompositeProperties<DimensionRessourceModel>() {
                @Override
                public String getSelectSuggestRenderer(DimensionRessourceModel row) {
                    return construireLabelRessource(row, false);
                }

                @Override
                public String[] getResultColumnsRenderer() {
                    return new String[] {};
                }

                @Override
                public String[] getResultRowsRenderer(DimensionRessourceModel row) {
                    return new String[] { construireLabelRessource(row, true) };
                }

                @Override
                public String getSuggestListBoxMultiplePopupTitle() {
                    return viewConstants.titrePopUpSelection();
                }

                @Override
                public Integer getLeftPosition() {
                    return LEFT_POSITION_CENTER;
                }

                @Override
                public Integer getTopPosition() {
                    return TOP_POSITION_CENTER;
                }
            });
    slbCreateur.ensureDebugId(viewDebugIdConstants.debugIdSlbCreateur());
    slbCreateur.setScrollPanelSuggestMultipleHeight(
            ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE);
    aideslbCreateur = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_CREATEUR, isAdmin);
    final HorizontalPanel panelslbCreateur = new HorizontalPanel();
    panelslbCreateur.setSpacing(3);
    panelslbCreateur.add(slbCreateur);
    panelslbCreateur.add(aideslbCreateur);
    ajouterAideComposant(aideslbCreateur);

    slbAttribueA = new DecoratedSuggestListBoxComposite<DimensionRessourceModel>(
            new SuggestListBoxCompositeProperties<DimensionRessourceModel>() {
                @Override
                public String getSelectSuggestRenderer(DimensionRessourceModel row) {
                    return construireLabelRessource(row, false);
                }

                @Override
                public String[] getResultColumnsRenderer() {
                    return new String[] {};
                }

                @Override
                public String[] getResultRowsRenderer(DimensionRessourceModel row) {
                    return new String[] { construireLabelRessource(row, true) };
                }

                @Override
                public String getSuggestListBoxMultiplePopupTitle() {
                    return viewConstants.titrePopUpSelection();
                }

                @Override
                public Integer getLeftPosition() {
                    return LEFT_POSITION_CENTER;
                }

                @Override
                public Integer getTopPosition() {
                    return TOP_POSITION_CENTER;
                }
            });
    slbAttribueA.ensureDebugId(viewDebugIdConstants.debugIdSlbAttribueA());
    slbAttribueA.setScrollPanelSuggestMultipleHeight(
            ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE);
    aideslbAttribueA = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_ATTRIBUE_A, isAdmin);
    final HorizontalPanel panelslbAttribueA = new HorizontalPanel();
    panelslbAttribueA.setSpacing(3);
    panelslbAttribueA.add(slbAttribueA);
    panelslbAttribueA.add(aideslbAttribueA);
    ajouterAideComposant(aideslbAttribueA);

    slbAgence = new DecoratedSuggestListBoxComposite<IdentifiantLibelleGwt>(
            new SuggestListBoxCompositeProperties<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() };
                }

                @Override
                public String getSuggestListBoxMultiplePopupTitle() {
                    return viewConstants.titrePopUpSelection();
                }

                @Override
                public Integer getLeftPosition() {
                    return LEFT_POSITION_CENTER;
                }

                @Override
                public Integer getTopPosition() {
                    return TOP_POSITION_CENTER;
                }
            });
    slbAgence.ensureDebugId(viewDebugIdConstants.debugIdSlbAgence());
    slbAgence.setScrollPanelSuggestMultipleHeight(
            ActionsMoteurRechercheViewImplConstants.HAUTEUR_SCROLLPANEL_LISTBOX_MULTIPLE);
    aideslbAgence = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_AGENCE, isAdmin);
    final HorizontalPanel panelslbAgence = new HorizontalPanel();
    panelslbAgence.setSpacing(3);
    panelslbAgence.add(slbAgence);
    panelslbAgence.add(aideslbAgence);
    ajouterAideComposant(aideslbAgence);

    cbRechercheEtEntreAgencesEtCommerciaux = new CheckBox();
    cbRechercheEtEntreAgencesEtCommerciaux
            .ensureDebugId(viewDebugIdConstants.debugIdCbRechercheEtEntreAgencesEtCommerciaux());

    final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.libeleCreation());
    fieldSetPanel.setHeight(ActionsMoteurRechercheViewImplConstants.HAUTEUR_BLOC);
    final FlexTable fpCreation = new FlexTable();
    fpCreation.setCellSpacing(5);
    final Label createur = creerLibelle(viewConstants.createur());
    final Label agence = creerLibelle(viewConstants.agence());
    final Label rechercheEt = creerLibelle(viewConstants.rechercheEt());
    final Label attribueA = creerLibelle(viewConstants.attribueA());

    fpCreation.setWidget(0, 0, createur);
    fpCreation.setWidget(0, 1, panelslbCreateur);
    fpCreation.setWidget(1, 0, agence);
    fpCreation.setWidget(1, 1, panelslbAgence);
    fpCreation.setWidget(2, 0, rechercheEt);
    fpCreation.setWidget(2, 1, cbRechercheEtEntreAgencesEtCommerciaux);
    fpCreation.setWidget(3, 0, attribueA);
    fpCreation.setWidget(3, 1, panelslbAttribueA);

    fpCreation.getColumnFormatter().setWidth(0, "25%");
    fieldSetPanel.add(fpCreation);
    fieldSetPanel.setHeight("200px");
    return fieldSetPanel;
}

From source file:com.square.client.gwt.client.view.action.moteur.recherche.ActionMoteurRechercheViewImpl.java

License:Open Source License

private Widget construireBlocPlanification() {
    clBdateDebut = new DecoratedCalendrierDateBox();
    clBdateDebut.ensureDebugId(viewDebugIdConstants.debugIdClBdateDebut());
    aideclBdateDebut = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_DATE_DEBUT, isAdmin);
    final HorizontalPanel panelclBdateDebut = new HorizontalPanel();
    panelclBdateDebut.setSpacing(1);
    panelclBdateDebut.add(clBdateDebut);
    panelclBdateDebut.add(aideclBdateDebut);
    ajouterAideComposant(aideclBdateDebut);

    clBdateFin = new DecoratedCalendrierDateBox();
    clBdateFin.ensureDebugId(viewDebugIdConstants.debugIdClBdateFin());
    aideclBdateFin = new AideComposant(AideComposantConstants.AIDE_ACTION_RECHERCHE_DATE_FIN, isAdmin);
    final HorizontalPanel panelclBdateFin = new HorizontalPanel();
    panelclBdateFin.setSpacing(1);//from   w  ww .j  a  v  a2  s.  com
    panelclBdateFin.add(clBdateFin);
    panelclBdateFin.add(aideclBdateFin);
    ajouterAideComposant(aideclBdateFin);

    final CaptionPanel fieldSetPanel = new CaptionPanel(viewConstants.planification());
    fieldSetPanel.setHeight(ActionsMoteurRechercheViewImplConstants.HAUTEUR_BLOC);
    final FlexTable fpPlanification = new FlexTable();
    fpPlanification.setCellSpacing(1);
    final Label dateDebut = creerLibelle(viewConstants.dateDebut());
    final Label dateFin = creerLibelle(viewConstants.dateFin());

    fpPlanification.setWidget(0, 0, dateDebut);
    fpPlanification.setWidget(0, 1, panelclBdateDebut);
    fpPlanification.setWidget(1, 0, dateFin);
    fpPlanification.setWidget(1, 1, panelclBdateFin);
    panelclBdateDebut.setWidth("105%");
    panelclBdateFin.setWidth("105%");
    fieldSetPanel.add(fpPlanification);
    fieldSetPanel.setHeight("200px");
    return fieldSetPanel;
}

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/*from www. j  a va  2 s. 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  va 2  s  . 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.action.transfert.ActionTransfertViewImpl.java

License:Open Source License

/** Construction du bloc de boutons. */
private HorizontalPanel construireBlocBouton() {
    final HorizontalPanel horizontalPanel = new HorizontalPanel();
    btnTransferer = new DecoratedButton(viewConstants.transferer());
    btnTransferer.ensureDebugId(viewDebugIdConstants.debugIdBtnTransferer());
    btnAnnuler = new DecoratedButton(viewConstants.annuler());
    btnAnnuler.ensureDebugId(viewDebugIdConstants.debugIdBtnAnnuler());
    horizontalPanel.add(btnTransferer);/*from ww  w .  j  a v  a2 s.  c  om*/
    horizontalPanel.add(btnAnnuler);
    horizontalPanel.setSpacing(5);
    return horizontalPanel;
}

From source file:com.square.client.gwt.client.view.agenda.AgendaViewImpl.java

License:Open Source License

private void construireBlocBouton() {
    final HorizontalPanel hpBoutons = new HorizontalPanel();

    btVueMois = new DecoratedButton(viewConstants.libelleMois());
    btVueMois.ensureDebugId(viewDebugIdConstants.debugIdBtVueMois());
    btVueSemaine = new DecoratedButton(viewConstants.libelleSemaine());
    btVueSemaine.ensureDebugId(viewDebugIdConstants.debugIdBtVueSemaine());
    btRemiseAZero = new DecoratedButton(viewConstants.libelleJour());
    btRemiseAZero.ensureDebugId(viewDebugIdConstants.debugIdBtRemiseAZero());
    btAvancer = new PushButton(new Image(SmatisResources.INSTANCE.iconeOngletScrollDroite()));
    btAvancer.ensureDebugId(viewDebugIdConstants.debugIdBtAvancer());
    btReculer = new PushButton(new Image(SmatisResources.INSTANCE.iconeOngletScrollGauche()));
    btReculer.ensureDebugId(viewDebugIdConstants.debugIdBtReculer());
    btReculer.setStylePrimaryName("agendaPushButton");
    btAvancer.setStylePrimaryName("agendaPushButton");

    final HorizontalPanel hpVues = new HorizontalPanel();
    hpVues.add(btVueSemaine);/*from  w w w.  j a v  a  2 s  .c  o m*/
    hpVues.add(btVueMois);
    hpVues.setSpacing(5);
    hpBoutons.add(hpVues);

    final HorizontalPanel hpValeur = new HorizontalPanel();
    lPeriode = new Label();
    hpValeur.add(lPeriode);
    hpValeur.setSpacing(5);
    hpBoutons.add(hpValeur);

    final HorizontalPanel hpDeplacement = new HorizontalPanel();
    hpDeplacement.add(btReculer);
    hpDeplacement.add(btRemiseAZero);
    hpDeplacement.add(btAvancer);
    hpDeplacement.setSpacing(5);
    hpDeplacement.setCellVerticalAlignment(btAvancer, HasAlignment.ALIGN_MIDDLE);
    hpDeplacement.setCellVerticalAlignment(btReculer, HasAlignment.ALIGN_MIDDLE);
    hpBoutons.add(hpDeplacement);

    hpBoutons.setCellHorizontalAlignment(hpDeplacement, HasAlignment.ALIGN_RIGHT);
    hpBoutons.setCellHorizontalAlignment(hpVues, HasAlignment.ALIGN_LEFT);
    hpBoutons.setCellHorizontalAlignment(hpValeur, HasAlignment.ALIGN_CENTER);
    hpBoutons.setCellVerticalAlignment(hpValeur, HasAlignment.ALIGN_MIDDLE);

    hpBoutons.setWidth(AppControllerConstants.POURCENT_100);
    conteneur.add(hpBoutons);
}