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

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

Introduction

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

Prototype

public void setVerticalAlignment(VerticalAlignmentConstant align) 

Source Link

Document

Sets the default vertical alignment to be used for widgets added to this panel.

Usage

From source file:com.risevision.ui.client.common.widgets.textStyle.TextStyleWidget.java

License:Open Source License

public TextStyleWidget(String propertyId) {
    this.propertyId = propertyId;

    HorizontalPanel panel = new HorizontalPanel();

    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    editStyleButton.getElement().getStyle().setProperty("backgroundImage", "url(/images/font.png)");
    editStyleButton.getElement().getStyle().setProperty("cursor", "hand");
    editStyleButton.setHeight("16px");
    editStyleButton.setWidth("16px");

    styleLabel.addStyleName("rdn-OverflowElipsis");
    styleLabel.setWidth("400px");

    panel.add(styleLabel);//from   w  ww  .j  av a2  s.  c  o  m
    panel.add(new SpacerWidget());
    panel.add(editStyleButton);

    editStyleButton.addClickHandler(this);
    hideCommand = new Command() {
        @Override
        public void execute() {
            setText(styleDialog.getStyle());
        }
    };

    initWidget(panel);
}

From source file:com.scurab.web.drifmaps.client.form.VerySimpleForm.java

License:Apache License

protected Widget hp(Widget first, Widget... others) {
    if (others.length == 0) {
        return first;
    }//from w  w w  .j ava 2s .  c  o  m

    HorizontalPanel p = new HorizontalPanel();
    p.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    p.add(first);
    for (Widget other : others) {
        // mmmm.. hacky.
        p.add(new HTML("  "));
        p.add(other);
    }
    return p;
}

From source file:com.scurab.web.drifmaps.client.form.VerySimpleForm.java

License:Apache License

protected Widget hpWithNoGap(Widget first, Widget... others) {
    if (others.length == 0) {
        return first;
    }//from  w  ww.ja  va 2 s. co  m

    HorizontalPanel p = new HorizontalPanel();
    p.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    p.add(first);
    for (Widget other : others) {
        p.add(other);
    }
    return p;
}

From source file:com.seanchenxi.gwt.ui.widget.SearchBox.java

License:Apache License

public SearchBox() {
    super(true, true);
    HorizontalPanel container = new HorizontalPanel();
    setWidget(container);//from  ww  w . j  av  a2s.c om
    setStyleName(getResources().style().popSearchBox());
    container.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
    container.add(field = new TextBox());
    container.add(button = new Button("Search"));
    container.setStyleName(getResources().style().popSearchContainer());
    field.setStyleName(getResources().style().popSearchField());
    button.setStyleName(getResources().style().popSearchButton());
    initAllHandlers();
}

From source file:com.sensia.tools.client.swetools.editors.sensorml.panels.CenterPanel.java

License:Open Source License

private Panel getXMLViewPanel() {
    final HorizontalPanel panel = new HorizontalPanel();
    panel.setSpacing(20);/*from   w  w w . j a  v a  2s .  co  m*/
    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    HTML title = new HTML("<b>SensorML XML:</b>");
    final Button load = new Button("Load");

    //init radio buttons choices
    final RadioButton fromLocalFileSystem = new RadioButton("myRadioGroup", "from local");
    final RadioButton fromUrl = new RadioButton("myRadioGroup", "from url");

    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(fromLocalFileSystem);
    hPanel.add(fromUrl);

    //container for either local file system input panel or url valueBox
    final SimplePanel fromPanel = new SimplePanel();

    //init file upload panel
    final ISourcePanel fileUploadPanel = new LocalFileSourcePanel(smlEditorProcessor, editCheckbox);

    //init url load
    final ISourcePanel urlDownloadPanel = new UrlSourcePanel(smlEditorProcessor, editCheckbox);

    //add to xml panel
    panel.add(title);
    panel.add(hPanel);
    panel.add(fromPanel);
    panel.add(load);

    //set from local file system panel as default choice
    fromLocalFileSystem.setChecked(true);
    fromPanel.add(fileUploadPanel.getPanel());

    //add listener to handle event
    load.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            if (fromLocalFileSystem.getValue()) {
                fileUploadPanel.parseContent();
            } else if (fromUrl.getValue()) {
                urlDownloadPanel.parseContent();
            }
        }
    });

    //add listener to handle from local file system handler
    fromLocalFileSystem.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            if (event.getValue()) {
                fromPanel.clear();
                fromPanel.add(fileUploadPanel.getPanel());
            }
        }
    });

    //add listener to handle from local file system handler
    fromUrl.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            if (event.getValue()) {
                fromPanel.clear();
                fromPanel.add(urlDownloadPanel.getPanel());
            }
        }
    });

    return panel;
}

From source file:com.sensia.tools.client.swetools.editors.sensorml.panels.CenterPanel.java

License:Open Source License

private Panel getProfilePanel() {
    final HorizontalPanel panel = new HorizontalPanel();
    panel.setSpacing(20);/* w w w . ja va2 s . c  o  m*/
    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    final ListBox profileListBox = new ListBox(false);

    profileListBox.addItem("");
    for (final String profileName : profiles.keySet()) {
        profileListBox.addItem(profileName);
    }

    HTML titleProfile = new HTML("<b>Profiles:</b>");

    //button to load the selected profile
    Button load = new Button("Apply");
    editCheckbox = new CheckBox("Edit");

    panel.add(titleProfile);
    panel.add(profileListBox);
    panel.add(load);
    panel.add(editCheckbox);

    editCheckbox.setVisible(false);

    //after clicking on the checkbox, the mode is sent to the tree hierarchy starting from the Root element
    editCheckbox.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            if (root != null) {
                MODE mode = (editCheckbox.isChecked()) ? MODE.EDIT : MODE.VIEW;
                root.switchMode(mode);
            }
        }
    });

    load.addClickHandler(new LoadProfileButtonClickListener(profileListBox, profiles, smlEditorProcessor));

    return panel;
}

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  .ja v  a2  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;
        }
    };

    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("&nbsp;"));
    conteneurDateDebut.add(auDateDebut);
    conteneurDateDebut.add(new HTML("&nbsp;"));
    conteneurDateDebut.add(panelcdbDateSupDateDebut);
    final HorizontalPanel conteneurDateFin = new HorizontalPanel();
    conteneurDateFin.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
    conteneurDateFin.add(panelcdbDateInfDateFin);
    conteneurDateFin.add(new HTML("&nbsp;"));
    conteneurDateFin.add(auDateFin);
    conteneurDateFin.add(new HTML("&nbsp;"));
    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

private void constructionAction() {
    final CaptionPanel captionAction = new CaptionPanel(constants.titreAction());

    final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> properties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() {
        @Override//from www  . jav a  2s .  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() };
        }
    };

    // 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.physique.creation.PopupModificationPersonneDoublonViewImpl.java

License:Open Source License

/**
 * Constructeur par dfaut.//w w w  .  jav a2s .  c  o  m
 */
public PopupModificationPersonneDoublonViewImpl() {
    super(viewConstants.titrePopup(), false, false, true);

    focusPanel = new FocusPanel();
    focusPanel.setWidth(AppControllerConstants.POURCENT_100);

    // Ajout des boutons
    final VerticalPanel contenu = new VerticalPanel();
    contenu.setSpacing(10);
    contenu.setWidth(AppControllerConstants.POURCENT_100);

    final Label lAvertissement = new Label(viewConstants.msgAvertissement());

    final HorizontalPanel pBoutons = new HorizontalPanel();
    pBoutons.setSpacing(10);
    pBoutons.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    pBoutons.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

    btnEnregistrer = new DecoratedButton(viewConstants.labelBtnEnregistrer());
    btnEnregistrerPuisFusionner = new DecoratedButton(viewConstants.labelBtnEnregistrerPuisFusionner());
    btnAnnuler = new DecoratedButton(viewConstants.labelBtnAnnuler());

    pBoutons.add(btnEnregistrer);
    pBoutons.add(btnEnregistrerPuisFusionner);
    pBoutons.add(btnAnnuler);

    contenu.add(lAvertissement);
    contenu.add(pBoutons);
    contenu.setCellHorizontalAlignment(lAvertissement, HasHorizontalAlignment.ALIGN_LEFT);
    contenu.setCellHorizontalAlignment(pBoutons, HasHorizontalAlignment.ALIGN_CENTER);

    focusPanel.setWidget(contenu);
    this.setWidget(focusPanel, 0);
    this.setWidth(PopupModificationPersonneDoublonViewImplConstants.LARGEUR_POPUP);
    this.addStyleName(SquareResources.INSTANCE.css().popupModificationPersonneDoublon());
}

From source file:com.square.composant.ged.square.client.composant.panel.MessagePanel.java

License:Open Source License

/**
 * Constructeur par dfaut du panel de chargement.
 *///from www .  j a  va  2 s  .  com
public MessagePanel() {
    final HorizontalPanel container = new HorizontalPanel();
    container.setSpacing(5);
    container.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    container.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    container.setWidth("100%");

    image = new Image();
    lMessage = new Label();

    container.add(image);
    container.add(lMessage);

    this.initWidget(container);
    // Le widget n'est pas visible par dfaut
    this.setVisible(false);
}