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.composant.envoi.email.square.client.view.ComposantEnvoiEmailViewImpl.java

License:Open Source License

/**
 * Construit la barre de boutons./*  w w w  . j  a v  a2  s .  co m*/
 * @return le panel contenant les boutons.
 */
private HorizontalPanel construireBarreBoutons() {
    btnEnvoyerEmail = new DecoratedButton(viewConstants.btnEnvoyerEmail());
    btnJoindreFichier = new DecoratedButton(viewConstants.btnJoindreFichier());
    if (minimisable) {
        btnReduire = new DecoratedButton(viewConstants.reduire());
    }
    btnAnnuler = new DecoratedButton(viewConstants.btnAnnuler());

    final HorizontalPanel barreBoutons = new HorizontalPanel();
    barreBoutons.setSpacing(5);
    barreBoutons.add(btnEnvoyerEmail);
    barreBoutons.add(btnJoindreFichier);
    if (minimisable) {
        barreBoutons.add(btnReduire);
    }
    barreBoutons.add(btnAnnuler);

    return barreBoutons;
}

From source file:com.square.composant.flux.opportunite.client.view.PopupModifQuotasViewImpl.java

License:Open Source License

private HorizontalPanel construireBarreBoutons() {
    final HorizontalPanel pBarreBoutons = new HorizontalPanel();
    pBarreBoutons.setSpacing(5);
    btnEnregistrer = new DecoratedButton(viewConstants.btnEnregistrer());
    btnAnnuler = new DecoratedButton(viewConstants.btnAnnuler());
    pBarreBoutons.add(btnEnregistrer);/*from w w  w.j  a  va  2 s . com*/
    pBarreBoutons.add(btnAnnuler);
    return pBarreBoutons;
}

From source file:com.square.composant.fusion.square.client.view.fusion.FusionViewImpl.java

License:Open Source License

/** Construit la barre de boutons. */
private void construireBarreBoutons() {
    btnSuivant = new DecoratedButton(viewConstants.btnSuivant());
    btnSuivant.setVisible(false);/*from  w w w . j av  a2  s.co  m*/
    btnPrecedent = new DecoratedButton(viewConstants.btnPrecedent());
    btnPrecedent.setVisible(false);
    btnValiderFusion = new DecoratedButton(viewConstants.btnValiderFusion());
    btnValiderFusion.setVisible(false);

    // Barre de boutons de la page
    final HorizontalPanel pBarreBoutons = new HorizontalPanel();
    pBarreBoutons.setWidth(ComposantFusionPresenterConstants.POURCENT_100);

    // Contenu de la barre de boutons
    final HorizontalPanel pContenuBarreBoutons = new HorizontalPanel();
    pContenuBarreBoutons.setSpacing(5);
    pContenuBarreBoutons.add(btnSuivant);
    pContenuBarreBoutons.add(btnPrecedent);
    pContenuBarreBoutons.add(btnValiderFusion);

    pBarreBoutons.add(pContenuBarreBoutons);
    conteneur.add(pBarreBoutons);
}

From source file:com.square.composant.fusion.square.client.view.selection.doublon.SelectionDoublonViewImpl.java

License:Open Source License

/** Cnostruit la barre de boutons. */
private void construireBarreBoutons() {
    btnValider = new DecoratedButton(viewConstants.btnValider());
    btnValider.setEnabled(false);/*from www.  j a v  a 2  s.  co  m*/
    btnViderSelection = new DecoratedButton(viewConstants.btnViderSelection());
    btnViderSelection.setEnabled(false);

    // Barre de boutons de la page
    final HorizontalPanel pBarreBoutons = new HorizontalPanel();
    pBarreBoutons.setWidth(ComposantFusionPresenterConstants.POURCENT_100);

    // Contenu de la barre de boutons
    final HorizontalPanel pContenuBarreBoutons = new HorizontalPanel();
    pContenuBarreBoutons.setSpacing(5);
    pContenuBarreBoutons.add(btnValider);
    pContenuBarreBoutons.add(btnViderSelection);

    pBarreBoutons.add(pContenuBarreBoutons);
    conteneur.add(pBarreBoutons);
}

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

License:Open Source License

/**
 * Constructeur par dfaut du panel de chargement.
 *//* w  ww. j a v a  2 s .  co m*/
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);
}

From source file:com.square.composant.ged.square.client.composant.popup.ConfirmPopup.java

License:Open Source License

/**
 * Constructeur de la popup./*from   w ww .j  a  v  a  2 s .c o  m*/
 */
public ConfirmPopup() {
    super(POPUP_CONSTANTS.titleLabel(), false, true, true);
    addStyleName(PopupConstants.CLASS_POPUP_CONFIRM);

    // on cree le panel vertical qui contient tout le contenu
    final VerticalPanel panel = new VerticalPanel();
    panel.setWidth(POURCENT_100);
    // on cree le panel horizontal qui contient le message et l'icone
    final HorizontalPanel panelMessage = new HorizontalPanel();
    panelMessage.setWidth(POURCENT_100);
    panelMessage.setSpacing(10);
    // on cree le panel horizontal des boutons
    final HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.setSpacing(5);

    final Image imagePopup = new Image(POPUP_IMAGES.confirmPopup());
    // on construit le panel du message
    message = new HTML();
    panelMessage.add(imagePopup);
    panelMessage.add(message);
    panelMessage.setCellWidth(imagePopup, PopupConstants.LARGEUR_IMAGE);
    panelMessage.setCellHorizontalAlignment(imagePopup, HasAlignment.ALIGN_LEFT);
    panelMessage.setCellVerticalAlignment(message, HasAlignment.ALIGN_MIDDLE);

    // on ajoute le bouton ok
    buttonOK = new DecoratedButton(POPUP_CONSTANTS.buttonOkLabel());
    buttonOK.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (getCallback() != null) {
                getCallback().onResult(RESULT_OK);
            }
            hide();
        }
    });
    buttonPanel.add(buttonOK);
    buttonNOK = new DecoratedButton(POPUP_CONSTANTS.buttonNOkLabel());
    buttonNOK.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (getCallback() != null) {
                getCallback().onResult(RESULT_NOK);
            }
            hide();
        }
    });
    buttonPanel.add(buttonNOK);
    final DecoratedButton buttonCancel = new DecoratedButton(POPUP_CONSTANTS.buttonCancelLabel());
    buttonCancel.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (getCallback() != null) {
                getCallback().onResult(RESULT_CANCEL);
            }
            hide();
        }
    });
    buttonPanel.add(buttonCancel);
    // on ajoute les panels dans le panel principal
    panel.add(panelMessage);
    panel.add(buttonPanel);
    panel.setCellHorizontalAlignment(buttonPanel, HasAlignment.ALIGN_RIGHT);
    setWidget(panel, 0);
}

From source file:com.square.composant.ged.square.client.composant.popup.ErrorPopup.java

License:Open Source License

/**
 * Constructeur de la popup.//w  w  w  .j a  v a2s.com
 */
private ErrorPopup() {
    super(POPUP_CONSTANTS.titleLabel(), false, true, true);
    addStyleName(PopupConstants.CLASS_POPUP_ERROR);

    // on cree le panel vertical qui contient tout le contenu
    final VerticalPanel panel = new VerticalPanel();
    panel.setWidth(POURCENT_100);
    // on cree le panel horizontal qui contient le message et l'icone
    final HorizontalPanel panelMessage = new HorizontalPanel();
    panelMessage.setWidth(POURCENT_100);
    panelMessage.setSpacing(10);
    // on cree le panel horizontal des boutons
    final HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.setSpacing(5);

    final Image imagePopup = new Image(POPUP_IMAGES.errorPopup());
    // on construit le panel du message
    message = new HTML();
    panelMessage.add(imagePopup);
    panelMessage.add(message);
    panelMessage.setCellWidth(imagePopup, PopupConstants.LARGEUR_IMAGE);
    panelMessage.setCellHorizontalAlignment(imagePopup, HasAlignment.ALIGN_LEFT);
    panelMessage.setCellVerticalAlignment(message, HasAlignment.ALIGN_MIDDLE);

    // on ajoute le bouton ok
    buttonOK = new DecoratedButton(POPUP_CONSTANTS.buttonOkLabel());
    buttonOK.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            hide();
        }
    });
    buttonPanel.add(buttonOK);
    // on ajoute les panels dans le panel principal
    panel.add(panelMessage);
    panel.add(buttonPanel);
    panel.setCellHorizontalAlignment(buttonPanel, HasAlignment.ALIGN_RIGHT);
    setWidget(panel, 0);
}

From source file:com.square.composant.ged.square.client.composant.popup.LoadingPopup.java

License:Open Source License

/** Constructeur priv. */
private LoadingPopup() {
    super(POPUP_CONSTANTS.titleLabel(), false, true, true);
    setGlassPanelStyleName(PopupConstants.CLASS_GLASS_PANEL_LOADING_POPUP);
    addStyleName(PopupConstants.CLASS_POPUP_LOADING);

    contenu = new SimplePanel();
    contenu.addStyleName(PopupConstants.CLASS_CONTENU_POPUP_LOADING);

    final HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.setWidth(Popup.POURCENT_100);
    hPanel.setSpacing(PopupConstants.SPACING);
    hPanel.add(contenu);//from w w w  . j ava2 s  .  c  o  m
    hPanel.setCellVerticalAlignment(contenu, HasVerticalAlignment.ALIGN_MIDDLE);
    hPanel.setCellHorizontalAlignment(contenu, HasHorizontalAlignment.ALIGN_CENTER);

    this.setWidget(hPanel);
}

From source file:com.square.composant.prestations.square.client.view.moteur.recherche.MoteurRecherchePrestationsViewImpl.java

License:Open Source License

private Widget construireBarreBoutons() {
    final HorizontalPanel pBoutons = new HorizontalPanel();
    pBoutons.setSpacing(5);
    btnRechercher = new DecoratedButton(viewConstants.rechercher());
    btnInitRecherche = new DecoratedButton(viewConstants.initRecherche());
    pBoutons.add(btnRechercher);//from w  w  w .  j  a v  a 2  s .c o m
    pBoutons.add(btnInitRecherche);
    return pBoutons;
}

From source file:com.square.composant.tarificateur.square.client.ComposantTarificateurViewImpl.java

License:Open Source License

/**
 * Constructeur.//from www .  jav  a  2 s  .c o m
 * @param hasRoleAdmin vrai si l'utilisateur connect a le rle admin square
 */
public ComposantTarificateurViewImpl(boolean hasRoleAdmin, boolean hasRoleAnimateur) {
    this.viewConstants = (ComposantTarificateurViewImplConstants) GWT
            .create(ComposantTarificateurViewImplConstants.class);

    final VerticalPanel conteneur = new VerticalPanel();
    conteneur.setWidth(ComposantTarificateurConstants.POURCENT_100);
    conteneur.addStyleName(ComposantTarificateur.RESOURCES.css().composantTarificateur());

    btnAjouterDevis = new DecoratedButton(viewConstants.ajouterDevis());
    btnVoirActions = new DecoratedButton(viewConstants.voirActions());
    btnSupprimerOpportunite = new DecoratedButton(viewConstants.supprimerOpportunite());
    btnSupprimerOpportunite.setVisible(hasRoleAdmin);

    final HorizontalPanel conteneurBoutons = new HorizontalPanel();
    conteneurBoutons.setSpacing(5);
    conteneurBoutons.add(btnAjouterDevis);
    conteneurBoutons.add(btnVoirActions);
    conteneurBoutons.add(btnSupprimerOpportunite);

    final Label lDateClotureIntitule = new Label(viewConstants.labelDateCloture());
    final Label lDateSignatureIntitule = new Label(viewConstants.labelDateSignature());
    final Label lDateEditionBAIntitule = new Label(viewConstants.labelDateEditionBA());
    lDateCloture = new Label();
    lDateSignature = new Label();
    lDateEditionBA = new Label();

    final FlexTable ftDates = new FlexTable();
    ftDates.setCellSpacing(3);
    ftDates.setWidget(0, 0, lDateClotureIntitule);
    ftDates.setWidget(0, 1, lDateCloture);
    ftDates.setWidget(1, 0, lDateSignatureIntitule);
    ftDates.setWidget(1, 1, lDateSignature);
    ftDates.setWidget(2, 0, lDateEditionBAIntitule);
    ftDates.setWidget(2, 1, lDateEditionBA);

    final CaptionPanel cpDates = new CaptionPanel(viewConstants.captionDates());
    cpDates.add(ftDates);
    cpDates.setHeight(HAUTEUR_CAPTION_PANEL);

    final Label lNatureIntitule = new Label(viewConstants.labelNature());
    lNature = new Label();

    final FlexTable ftInformations = new FlexTable();
    ftInformations.setCellSpacing(3);
    ftInformations.setWidget(0, 0, lNatureIntitule);
    ftInformations.setWidget(0, 1, lNature);

    final CaptionPanel cpInformations = new CaptionPanel(viewConstants.captionInformations());
    cpInformations.add(ftInformations);
    cpInformations.setHeight(HAUTEUR_CAPTION_PANEL);

    final Grid conteneurSyntheseInformations = new Grid(1, 2);
    conteneurSyntheseInformations.setCellSpacing(5);
    conteneurSyntheseInformations.setWidth(ComposantTarificateurConstants.POURCENT_100);
    conteneurSyntheseInformations.setWidget(0, 0, cpDates);
    conteneurSyntheseInformations.setWidget(0, 1, cpInformations);
    conteneurSyntheseInformations.getColumnFormatter().setWidth(0, ComposantTarificateurConstants.POURCENT_50);
    conteneurSyntheseInformations.getColumnFormatter().setWidth(1, ComposantTarificateurConstants.POURCENT_50);
    conteneurSyntheseInformations.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_TOP);

    conteneurDevis = new VerticalPanel();
    conteneurDevis.setWidth(ComposantTarificateurConstants.POURCENT_100);
    conteneurDevis.setSpacing(5);

    conteneur.add(conteneurBoutons);
    conteneur.add(conteneurSyntheseInformations);
    conteneur.add(conteneurDevis);
    this.initWidget(conteneur);
    this.setWidth(ComposantTarificateurConstants.POURCENT_100);
}