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

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

Introduction

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

Prototype

public void setCellVerticalAlignment(IsWidget w, VerticalAlignmentConstant align) 

Source Link

Document

Overloaded version for IsWidget.

Usage

From source file:com.pronoiahealth.olhie.client.features.dialogs.NewBookDialog.java

License:Open Source License

/**
 * Watches for a list of covers to be returned and then loads the cover list
 * /* www  . j a v a2s  .c om*/
 * @param bookCoverListResponseEvent
 */
protected void observesBookCoverListResponseEvent(
        @Observes BookCoverListResponseEvent bookCoverListResponseEvent) {
    if (mode.equals(ModeEnum.NEW)) {
        bookCoverDropDown.setText("Select a book cover");
    }
    bookCoverDropDown.getMenuWiget().clear();
    List<BookCover> bookCovers = bookCoverListResponseEvent.getBookCover();
    if (bookCovers != null) {
        for (BookCover cover : bookCovers) {
            String coverName = cover.getCoverName();
            NavWidget link = new NavWidget();
            link.setName(coverName);
            HorizontalPanel panel = new HorizontalPanel();
            Image img = new Image();
            img.setUrl(cover.getCustomIcon());
            HTMLPanel htmlPanel = new HTMLPanel(coverName);
            htmlPanel.getElement().setAttribute("style", "padding-left: 10px;");
            panel.add(img);
            panel.add(htmlPanel);
            panel.setCellVerticalAlignment(htmlPanel, HasVerticalAlignment.ALIGN_MIDDLE);
            link.add(panel);
            link.addClickHandler(coverClickedHandler);
            panel.getElement().setAttribute("img-url", cover.getImgUrl());
            bookCoverDropDown.getMenuWiget().add(link);

            if (mode.equals(ModeEnum.EDIT) && cover.getCoverName().equals(book.getCoverName())) {
                largeBookWidget.setBackground(cover.getImgUrl());
            }
        }
    }
}

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

License:Open Source License

/** Construction du bloc de planification. */
private void construireBlocPlanification() {
    final SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleGwt>() {
        @Override/*from  w  w  w  .j ava  2  s . 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() };
        }
    };

    final Label labelAFaire = new Label(viewConstants.labelAFaire(), false);
    cdbDateAction = new DecoratedCalendrierDateBox(true);
    cdbDateAction.ensureDebugId(viewDebugIdConstants.debugIdCdbDateAction());
    aidecdbDateAction = new AideComposant(AideComposantConstants.AIDE_ACTION_CREATION_DATE, isAdmin);
    // listComposantAide.add(aidecdbDateAction);
    ajouterAideComposant(aidecdbDateAction);
    final Label labelDebut = new Label(viewConstants.labelDebut(), false);
    tbfHeureAction = new DecoratedTextBoxFormat("NN:NN");
    tbfHeureAction.ensureDebugId(viewDebugIdConstants.debugIdTbfHeureAction());
    tbfHeureAction.addStyleName(SquareResources.INSTANCE.css().heureDate());
    aideTbfHeureAction = new AideComposant(AideComposantConstants.AIDE_ACTION_CREATION_HEURE, isAdmin);
    HorizontalPanel panelHeure = new HorizontalPanel();
    panelHeure.setSpacing(5);
    panelHeure.add(tbfHeureAction);
    panelHeure.add(aideTbfHeureAction);
    panelHeure.setCellVerticalAlignment(aideTbfHeureAction, HasAlignment.ALIGN_MIDDLE);
    ajouterAideComposant(aideTbfHeureAction);
    final Label labelDuree = new Label(viewConstants.labelDuree(), false);
    slbDuree = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbDuree.ensureDebugId(viewDebugIdConstants.debugIdSlbDuree());
    slbDuree.setWidth(ActionCreationViewImplConstants.LARGEUR_SLB_DUREE);
    aideSlbDuree = new AideComposant(100014L, isAdmin);
    ajouterAideComposant(aideSlbDuree);

    // Constuction de la priorite
    final Label lpriorite = new Label(viewConstants.priorite());
    slbPriorite = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties);
    slbPriorite.ensureDebugId(viewDebugIdConstants.debugIdSlbPriorite());
    aideSlbPriorite = new AideComposant(AideComposantConstants.AIDE_ACTION_CREATION_PRIORITE, isAdmin);
    HorizontalPanel panelPriorite = new HorizontalPanel();
    panelPriorite.setSpacing(5);
    panelPriorite.add(slbPriorite);
    panelPriorite.add(aideSlbPriorite);
    ajouterAideComposant(aideSlbPriorite);

    final CaptionPanel captionPanel = new CaptionPanel(viewConstants.libellePanelPlanification());
    final FlexTable flexTable = new FlexTable();
    flexTable.setWidth(AppControllerConstants.POURCENT_100);
    flexTable.setCellSpacing(3);
    flexTable.setWidget(0, 0, labelAFaire);
    flexTable.setWidget(0, 1,
            construireBlocIcone(cdbDateAction, "ActionCreationDto.dateAction", aidecdbDateAction));
    flexTable.setWidget(0, 2, labelDebut);
    flexTable.setWidget(0, 3, panelHeure);
    flexTable.setWidget(0, 4, labelDuree);
    flexTable.setWidget(0, 5, construireBlocIcone(slbDuree, "ActionCreationDto.idDuree", aideSlbDuree));
    flexTable.setWidget(1, 0, lpriorite);
    flexTable.setWidget(1, 1, panelPriorite);
    flexTable.getFlexCellFormatter().setColSpan(1, 1, 5);
    flexTable.getRowFormatter().setVerticalAlign(0, HasAlignment.ALIGN_MIDDLE);
    flexTable.getRowFormatter().setVerticalAlign(1, HasAlignment.ALIGN_MIDDLE);
    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);/*from  ww w  .  j av  a2 s .  c om*/
    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

/**
 * Construit un bloc avec un label et un champ pour l'affichage.
 *//*www  . ja  v  a 2s  .  c om*/
private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp,
        AideComposant aideComposant) {
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    final HorizontalPanel panelIcone = new HorizontalPanel();
    panelIcone.add(icone);
    panelIcone.add(aideComposant);
    panel.add(panelIcone);
    panel.setCellVerticalAlignment(panelIcone, HasVerticalAlignment.ALIGN_MIDDLE);
    return panel;
}

From source file:com.square.client.gwt.client.view.action.transfert.ActionTransfertViewImpl.java

License:Open Source License

/**
 * Construit un bloc avec un label et un champ pour l'affichage.
 *//*from w  w  w .ja v  a 2 s. c om*/
private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp) {
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    panel.add(icone);
    panel.setCellVerticalAlignment(icone, HasVerticalAlignment.ALIGN_MIDDLE);
    return panel;
}

From source file:com.square.client.gwt.client.view.action.transfert.ActionTransfertViewImpl.java

License:Open Source License

/**
 * Construit un bloc avec un label et un champ pour l'affichage et un champ d'aide.
 *///from   ww w. jav a  2 s.c  o  m
private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp,
        AideComposant aideComposant) {
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    HorizontalPanel panelIcone = new HorizontalPanel();
    // panelIcone.setSpacing(5);
    panelIcone.add(icone);
    panelIcone.add(aideComposant);
    panel.add(panelIcone);
    // panelIcone.setCellVerticalAlignment(aideComposant, HasVerticalAlignment.ALIGN_MIDDLE);
    panel.setCellVerticalAlignment(panelIcone, HasVerticalAlignment.ALIGN_MIDDLE);
    return panel;
}

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);//  ww w  .  j a v a  2s .c om
    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);
}

From source file:com.square.client.gwt.client.view.campagne.creation.CampagneCreationViewImpl.java

License:Open Source License

/**
 * Construit un bloc avec un label et un champ pour l'affichage.
 *//*from w w  w . j av a 2s .  co  m*/
private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp) {
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    panel.add(icone);
    panel.setCellVerticalAlignment(icone, HasAlignment.ALIGN_MIDDLE);
    return panel;
}

From source file:com.square.client.gwt.client.view.campagne.gestion.CampagneGestionViewImpl.java

License:Open Source License

/**
 * Construit un bloc avec un champ pour l'affichage.
 *//*from   ww  w .  j  av  a  2 s .  c o  m*/
private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp) {
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    panel.add(icone);
    panel.setCellVerticalAlignment(icone, HasAlignment.ALIGN_MIDDLE);
    panel.setSpacing(5);
    return panel;
}

From source file:com.square.client.gwt.client.view.campagne.gestion.CampagneGestionViewImpl.java

License:Open Source License

private HorizontalPanel construireBlocIcone(final Widget composant, final String nomChamp,
        AideComposant aideComposant) {//w  w w. java2 s  .  com
    final IconeErreurChamp icone = iconeErreurChampManager.createInstance(nomChamp, composant);
    final HorizontalPanel panel = new HorizontalPanel();
    panel.add(composant);
    HorizontalPanel panelIcone = new HorizontalPanel();
    // panelIcone.setSpacing(5);
    panelIcone.add(icone);
    panelIcone.add(aideComposant);
    panel.add(panelIcone);
    // panelIcone.setCellVerticalAlignment(aideComposant, HasVerticalAlignment.ALIGN_MIDDLE);
    panel.setCellVerticalAlignment(panelIcone, HasVerticalAlignment.ALIGN_MIDDLE);
    return panel;
}