List of usage examples for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE
VerticalAlignmentConstant ALIGN_MIDDLE
To view the source code for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE.
Click Source Link
From source file:com.square.client.gwt.client.view.personne.physique.creation.PopupModificationPersonneDoublonViewImpl.java
License:Open Source License
/** * Constructeur par dfaut./*from w w w. ja v a 2 s .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.client.gwt.client.view.personne.physique.gestion.GestionPersonnePhysiqueViewImpl.java
License:Open Source License
/** * Construit un affichage pour le resume. * @return l'affichage correspondant au resume. *//* w w w . j a v a 2 s . c om*/ private Widget construireGestionPanel() { 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() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleBooleanModel> slbIdentifiantLibelleBooleanProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleBooleanModel>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleBooleanModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleBooleanModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; final SuggestListBoxSingleProperties<IdentifiantLibelleOuiNonModel> slbIdentifiantLibelleOuiNonProperties = new SuggestListBoxSingleProperties<IdentifiantLibelleOuiNonModel>() { @Override public String getSelectSuggestRenderer(IdentifiantLibelleOuiNonModel row) { return row == null ? "" : row.getLibelle(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(IdentifiantLibelleOuiNonModel row) { return new String[] { row == null ? "" : row.getLibelle() }; } }; btGenregistrer = new DecoratedButton(constants.lbGenregistrer()); btGenregistrer.ensureDebugId(constantsDebugId.debugIdBtGenregistrer()); // disableElement(btGenregistrer.getElement()); btGAnnuler = new DecoratedButton(constants.lbGannuler()); btGAnnuler.ensureDebugId(constantsDebugId.debugIdBtGAnnuler()); final HorizontalPanel conteneurBoutons = new HorizontalPanel(); conteneurBoutons.setSpacing(5); conteneurBoutons.add(btGenregistrer); conteneurBoutons.add(btGAnnuler); conteneurBoutons.setCellVerticalAlignment(btGAnnuler, HasVerticalAlignment.ALIGN_MIDDLE); final VerticalPanel panel = new VerticalPanel(); panel.setWidth(AppControllerConstants.POURCENT_100); panel.setSpacing(10); panel.add(construireBlocInformations(slbIdentifiantLibelleProperties)); panel.add(construireBlocInfosSup(slbIdentifiantLibelleProperties, slbIdentifiantLibelleBooleanProperties)); panel.add(construireBlocCreation()); panel.add(conteneurBoutons); panel.setCellHorizontalAlignment(conteneurBoutons, HasHorizontalAlignment.ALIGN_RIGHT); return panel; }
From source file:com.square.client.gwt.client.view.personne.physique.gestion.GestionPersonnePhysiqueViewImpl.java
License:Open Source License
private Widget construireBlocInfosSup( SuggestListBoxSingleProperties<IdentifiantLibelleGwt> slbIdentifiantLibelleProperties, SuggestListBoxSingleProperties<IdentifiantLibelleBooleanModel> slbIdentifiantLibelleBooleanProperties) { libDecede = new Label("", false); libDecede.ensureDebugId(constantsDebugId.debugIdLbGDecede()); lbGnumeroRo = new Label("", false); lbGnumeroRo.ensureDebugId(constantsDebugId.debugIdLbGnumeroRo()); lbGstatut = new Label("", false); lbGstatut.ensureDebugId(constantsDebugId.debugIdLbGstatut()); libGregime = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); aidelibGregime = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_GESTION_REGIME, isAdmin); ajouterAideComposant(aidelibGregime); libGregime.ensureDebugId(constantsDebugId.debugIdLibGregime()); libGsegment = new DecoratedSuggestListBoxSingle<IdentifiantLibelleGwt>(slbIdentifiantLibelleProperties); libGsegment.ensureDebugId(constantsDebugId.debugIdLibGsegment()); libGsegment.setEnabled(false);//from w w w .j a va 2s. c om aidelibGsegment = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_GESTION_SEGMENT, isAdmin); ajouterAideComposant(aidelibGsegment); final SuggestListBoxSingleProperties<CaisseSimpleModel> slbCaisseProperties = new SuggestListBoxSingleProperties<CaisseSimpleModel>() { @Override public String getSelectSuggestRenderer(CaisseSimpleModel row) { return row == null || row.getId().equals(constants.IDENTIFIANT_NC) ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(CaisseSimpleModel row) { return new String[] { row == null || row.getId().equals(constants.IDENTIFIANT_NC) ? "" : row.getCode() + "." + row.getCentre() + "." + row.getNom() }; } }; libGcaisse = new DecoratedSuggestListBoxSingle<CaisseSimpleModel>(slbCaisseProperties); libGcaisse.ensureDebugId(constantsDebugId.debugIdLibGcaisse()); aidelibGcaisse = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_GESTION_CAISSE, isAdmin); ajouterAideComposant(aidelibGcaisse); libGprofession = new DecoratedSuggestListBoxSingle<IdentifiantLibelleBooleanModel>( slbIdentifiantLibelleBooleanProperties); libGprofession.ensureDebugId(constantsDebugId.debugIdLibGprofession()); aidelibGprofession = new AideComposant(AideComposantConstants.AIDE_PERSONNE_PHYSIQUE_GESTION_PROFESSION, isAdmin); ajouterAideComposant(aidelibGprofession); final FlexTable flexTable = new FlexTable(); flexTable.setWidth(AppControllerConstants.POURCENT_100); flexTable.setCellSpacing(5); flexTable.setWidget(0, 0, libDecede); flexTable.setWidget(1, 0, new Label(constants.lbGnumeroRo(), false)); flexTable.setWidget(1, 1, lbGnumeroRo); flexTable.setWidget(1, 2, new Label(constants.lbGstatut(), false)); flexTable.setWidget(1, 3, lbGstatut); flexTable.setWidget(2, 0, new Label(constants.lbGregime(), false)); flexTable.setWidget(2, 1, construireBlocIcone(libGregime, "PersonneDto.infoSante.caisseRegime", aidelibGregime)); flexTable.setWidget(2, 2, new Label(constants.lbGsegment(), false)); flexTable.setWidget(2, 3, construireBlocIcone(libGsegment, "PersonneDto.segment", aidelibGsegment)); flexTable.setWidget(3, 0, new Label(constants.lbGcaisse(), false)); flexTable.setWidget(3, 1, construireBlocIcone(libGcaisse, "PersonneDto.infoSante.caisse", aidelibGcaisse)); flexTable.setWidget(3, 2, new Label(constants.lbGprofession(), false)); flexTable.setWidget(3, 3, construireBlocIcone(libGprofession, "PersonneDto.profession", aidelibGprofession)); flexTable.getFlexCellFormatter().setColSpan(0, 0, 2); flexTable.getRowFormatter().setVerticalAlign(2, HasVerticalAlignment.ALIGN_MIDDLE); flexTable.getColumnFormatter().setWidth(0, LARGEUR_COL_LIBELLE_0); flexTable.getColumnFormatter().setWidth(1, LARGEUR_COL_CHAMP_1); flexTable.getColumnFormatter().setWidth(2, LARGEUR_COL_LIBELLE_2); flexTable.getColumnFormatter().setWidth(3, LARGEUR_COL_CHAMP_3); final CaptionPanel captionPanel = new CaptionPanel(constants.lbGinformationSup()); captionPanel.add(flexTable); return captionPanel; }
From source file:com.square.client.gwt.client.view.personne.physique.gestion.GestionPersonnePhysiqueViewImpl.java
License:Open Source License
private HorizontalPanel construireBlocAide(final Widget composant, AideComposant aide) { final HorizontalPanel panel = new HorizontalPanel(); panel.setSpacing(0);//from ww w .j a v a 2s . co m panel.add(composant); panel.add(aide); panel.setCellVerticalAlignment(aide, HasVerticalAlignment.ALIGN_MIDDLE); panel.setCellHorizontalAlignment(aide, HasHorizontalAlignment.ALIGN_CENTER); panel.setCellWidth(aide, "40"); return panel; }
From source file:com.square.client.gwt.client.view.personne.relations.PersonneRelationPopupViewImpl.java
License:Open Source License
/** * Construit un bloc avec un label et un champ pour l'affichage et un champ d'aide. *///from w w w . j av a2 s . co 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); final HorizontalPanel panelIcone = new HorizontalPanel(); 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.personne.relations.PersonneRelationsBlocViewImpl.java
License:Open Source License
private void construireContenu() { contenu = new FlexTable(); contenu.setWidth(AppControllerConstants.POURCENT_100); final Label lRelation = new Label(viewConstants.libelleRelation(), false); final Label lDateFin = new Label(viewConstants.libelleDateFin(), false); final SuggestListBoxSingleProperties<ItemValueModel> properties = new SuggestListBoxSingleProperties<ItemValueModel>() { @Override/*w ww .j a v a 2s . c o m*/ public String getSelectSuggestRenderer(ItemValueModel row) { return row == null ? "" : row.getValue(); } @Override public String[] getResultColumnsRenderer() { return new String[] {}; } @Override public String[] getResultRowsRenderer(ItemValueModel row) { return new String[] { row == null ? "" : row.getValue() }; } }; suggestListBoxTypeRelation = new DecoratedSuggestListBoxSingle<ItemValueModel>(properties); suggestListBoxTypeRelation.ensureDebugId(viewDebugIdConstants.debugSuggestListBoxTypeRelation()); aidesuggestListBoxTypeRelation = new AideComposant( AideComposantConstants.AIDE_PERSONNE_RELATIONS_BLOC_TYPE_RELATION, isAdmin); ajouterAideComposant(aidesuggestListBoxTypeRelation); final HorizontalPanel hpSlbTypeRelation = construireBlocIcone(suggestListBoxTypeRelation, "RelationDto.type.libelle." + index, aidesuggestListBoxTypeRelation); lPersonneCible = new Label(); dateFin = new DecoratedCalendrierDateBox(true); dateFin.ensureDebugId(viewDebugIdConstants.debugIdDateFin()); aidedateFin = new AideComposant(AideComposantConstants.AIDE_PERSONNE_RELATIONS_BLOC_DATE_FIN, isAdmin); ajouterAideComposant(aidedateFin); imageSynthese = new Image(SquareResources.INSTANCE.iconeOngletPersonnePhysique()); imageSynthese.setStylePrimaryName(SquareResources.INSTANCE.css().lienFichePersonne()); imageSynthese.setTitle(viewConstants.titreImageLienPersonne()); conteneurImageContrat = new VerticalPanel(); conteneurImageActivation = new VerticalPanel(); contenu.setWidget(0, 0, lRelation); contenu.setWidget(0, 1, hpSlbTypeRelation); contenu.setWidget(0, 2, lPersonneCible); contenu.setWidget(0, 3, lDateFin); contenu.setWidget(0, 4, construireBlocIcone(dateFin, "RelationDto.dateFin." + index, aidedateFin)); contenu.setWidget(0, 5, imageSynthese); contenu.setWidget(0, 6, conteneurImageContrat); contenu.setWidget(0, 7, conteneurImageActivation); contenu.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_MIDDLE); contenu.getCellFormatter().setHorizontalAlignment(0, 5, HasHorizontalAlignment.ALIGN_CENTER); contenu.getCellFormatter().setHorizontalAlignment(0, 6, HasHorizontalAlignment.ALIGN_CENTER); contenu.getCellFormatter().setWidth(0, 0, "8%"); contenu.getCellFormatter().setWidth(0, 1, "27%"); contenu.getCellFormatter().setWidth(0, 2, "30%"); contenu.getCellFormatter().setWidth(0, 3, "5%"); contenu.getCellFormatter().setWidth(0, 4, "18%"); contenu.getCellFormatter().setWidth(0, 5, "4%"); contenu.getCellFormatter().setWidth(0, 6, "4%"); contenu.getCellFormatter().setWidth(0, 7, "4%"); }
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 w w .java2 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.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 . ja va 2 s . co m hPanel.setCellVerticalAlignment(contenu, HasVerticalAlignment.ALIGN_MIDDLE); hPanel.setCellHorizontalAlignment(contenu, HasHorizontalAlignment.ALIGN_CENTER); this.setWidget(hPanel); }
From source file:com.square.composant.ged.square.client.view.listecompacte.ListeCompacteDocumentsViewImpl.java
License:Open Source License
/** Constructeur par dfaut. */ public ListeCompacteDocumentsViewImpl() { viewConstants = GWT.create(ListeCompacteDocumentsViewImplConstants.class); final HorizontalPanel mainPanel = new HorizontalPanel(); mainPanel.setWidth("100%"); documentsPanel = new FlowPanel(); lienAjouter = new Anchor(viewConstants.ajouterDocument()); lienAjouter.addStyleName("lienDocumentModeCompact"); mainPanel.add(documentsPanel);// ww w . j a v a2s . co m mainPanel.add(lienAjouter); mainPanel.setCellWidth(lienAjouter, "200px"); mainPanel.setCellHorizontalAlignment(lienAjouter, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellVerticalAlignment(lienAjouter, HasVerticalAlignment.ALIGN_MIDDLE); messagePanel = new MessagePanel(); final VerticalPanel vPanel = new VerticalPanel(); vPanel.setWidth("100%"); vPanel.add(mainPanel); vPanel.add(messagePanel); initWidget(vPanel); }
From source file:com.square.composant.ged.square.client.view.listecompacte.ListeCompacteDocumentsViewImpl.java
License:Open Source License
@Override public HasClickHandlers ajouterLien(String nom, String url, String typeMime) { final HorizontalPanel panel = new HorizontalPanel(); panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); // Pour le moment, on n'affiche que le pdf en icone if (typeMime != null && typeMime.indexOf("pdf") > 0) { final Image image = new Image(viewConstants.dossierImagesTypesMime() + typeMime + ".png"); panel.add(image);/*from w ww . j a v a 2 s .co m*/ } final Anchor lien = new Anchor(nom, url, "_blank"); lien.addStyleName("lienDocumentModeCompact"); panel.add(lien); panel.addStyleName("blocDocumentModeCompact"); documentsPanel.add(panel); return lien; }