List of usage examples for com.vaadin.ui HorizontalLayout setHeight
@Override public void setHeight(String height)
From source file:fr.amapj.view.engine.grid.currencyvector.PopupCurrencyVector.java
License:Open Source License
protected void createContent(VerticalLayout mainLayout) { setType(PopupType.CENTERFIT);/* w w w. j a v a 2 s .c o m*/ loadParam(); if (param.messageSpecifique != null) { Label messageSpeLabel = new Label(param.messageSpecifique); messageSpeLabel.addStyleName("popup-currency-vector-message"); mainLayout.addComponent(messageSpeLabel); } if (param.messageSpecifique2 != null) { Label messageSpeLabel = new Label(param.messageSpecifique2, ContentMode.HTML); messageSpeLabel.addStyleName("popup-currency-vector-message"); mainLayout.addComponent(messageSpeLabel); } if (param.messageSpecifique3 != null) { Label messageSpeLabel = new Label(param.messageSpecifique3, ContentMode.HTML); messageSpeLabel.addStyleName("popup-currency-vector-message"); mainLayout.addComponent(messageSpeLabel); } if (param.avoirInitial != 0) { // Footer 1 avec le montant total des paiements HorizontalLayout footer1 = new HorizontalLayout(); footer1.setWidth("350px"); fillFooter(footer1, "Avoir initial", param.avoirInitial); // Footer 2 pour avoir un espace HorizontalLayout footer2 = new HorizontalLayout(); footer2.setWidth("200px"); footer2.setHeight("20px"); mainLayout.addComponent(footer1); mainLayout.addComponent(footer2); } // Construction des headers for (GridHeaderLine line : param.headerLines) { constructHeaderLine(mainLayout, line); } // Construction de la table de saisie table = new Table(); table.addStyleName("no-vertical-lines"); table.addStyleName("no-horizontal-lines"); table.addStyleName("no-stripes"); table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); // Colonne de gauche contenant un libell table.addContainerProperty(new Integer(-1), Label.class, null); table.setColumnWidth(new Integer(-1), param.largeurCol); // colonne de droite correspondant la saisie des quantites Class clzz; if (param.readOnly) { clzz = Label.class; } else { clzz = TextField.class; } table.addContainerProperty(new Integer(0), clzz, null); table.setColumnWidth(new Integer(0), param.largeurCol); // Convertion du vecteur en un tableau boolean[][] excluded = new boolean[param.excluded.length][1]; for (int i = 0; i < param.excluded.length; i++) { excluded[i][0] = param.excluded[i]; } if (param.readOnly == false) { shortCutManager = new ShortCutManager(param.nbLig, 1, excluded); shortCutManager.addShorcut(this.getWindow()); } // Creation de toutes les cellules pour la saisie for (int i = 0; i < param.nbLig; i++) { addRow(i); } if (param.readOnly) { table.setEditable(false); } else { table.setEditable(true); } table.setSelectable(true); table.setSortEnabled(false); table.setPageLength(getPageLength()); // Footer 0 pour avoir un espace HorizontalLayout footer0 = new HorizontalLayout(); footer0.setWidth("200px"); footer0.setHeight("20px"); // Construction globale mainLayout.addComponent(table); mainLayout.addComponent(footer0); if ((param.readOnly == true) || (param.computeLastLine == false)) { // Footer 1 avec le montant total des paiements HorizontalLayout footer1 = new HorizontalLayout(); footer1.setWidth("350px"); montantTotalPaiement = fillFooter(footer1, "Montant total paiements", getMontantTotalPaiement()); // Footer 2 pour avoir un espace HorizontalLayout footer2 = new HorizontalLayout(); footer2.setWidth("200px"); footer2.setHeight("20px"); // Footer 3 avec le prix total du contrat HorizontalLayout footer3 = new HorizontalLayout(); footer3.setWidth("350px"); fillFooter(footer3, "Montant total d", param.montantCible); mainLayout.addComponent(footer1); mainLayout.addComponent(footer2); mainLayout.addComponent(footer3); } else { // Footer 1 avec le prix total HorizontalLayout footer1 = new HorizontalLayout(); footer1.setWidth("350px"); fillFooter(footer1, "Montant total rgler", param.montantCible); mainLayout.addComponent(footer1); } }
From source file:fr.amapj.view.engine.grid.currencyvector.PopupCurrencyVector.java
License:Open Source License
private void constructHeaderLine(VerticalLayout mainLayout, GridHeaderLine line) { HorizontalLayout header1 = new HorizontalLayout(); header1.setWidth(getLargeurTotal()); if (line.height != -1) { header1.setHeight(line.height + "px"); }/* w ww.j a va2s. c om*/ for (String str : line.cells) { Label dateLabel = new Label(str); if (line.styleName != null) { dateLabel.addStyleName(line.styleName); } header1.addComponent(dateLabel); dateLabel.setSizeFull(); header1.setExpandRatio(dateLabel, 1.0f); } mainLayout.addComponent(header1); }
From source file:fr.amapj.view.engine.grid.integergrid.PopupIntegerGrid.java
License:Open Source License
protected void createContent(VerticalLayout mainLayout) { setType(PopupType.CENTERFIT);//w w w. j av a 2 s . co m loadParam(); param.initialize(); if (param.messageSpecifique != null) { Label messageSpeLabel = new Label(param.messageSpecifique); messageSpeLabel.addStyleName("popup-integer-grid-message"); mainLayout.addComponent(messageSpeLabel); } // Construction des headers for (GridHeaderLine line : param.headerLines) { constructHeaderLine(mainLayout, line); } // Construction de la table de saisie table = new Table(); table.addStyleName("no-vertical-lines"); table.addStyleName("no-horizontal-lines"); table.addStyleName("no-stripes"); table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); // Colonne de gauche contenant un libell table.addContainerProperty(new Integer(-1), Label.class, null); table.setColumnWidth(new Integer(-1), param.leftPartLineLargeur); // Les autres colonnes correspondant la saisie des quantites for (int i = 0; i < param.nbCol; i++) { Class clzz; if (param.readOnly) { clzz = Label.class; } else { clzz = TextField.class; } table.addContainerProperty(new Integer(i), clzz, null); table.setColumnWidth(new Integer(i), param.largeurCol); } // if (param.readOnly == false) { shortCutManager = new ShortCutManager(param.nbLig, param.nbCol, param.excluded); shortCutManager.addShorcut(this.getWindow()); } // Creation de toutes les cellules pour la saisie for (int i = 0; i < param.nbLig; i++) { addRow(i); } if (param.readOnly) { table.setEditable(false); } else { table.setEditable(true); } table.setSelectable(true); table.setSortEnabled(false); table.setPageLength(getPageLength()); // Footer 0 pour avoir un espace HorizontalLayout footer0 = new HorizontalLayout(); footer0.setWidth("200px"); footer0.setHeight("20px"); // Footer 1 avec le prix total HorizontalLayout footer1 = new HorizontalLayout(); Label dateLabel = new Label(param.libPrixTotal); dateLabel.addStyleName("libprix"); footer1.addComponent(dateLabel); prixTotal = new Label(""); displayMontantTotal(); prixTotal.addStyleName("prix"); prixTotal.setWidth("100px"); footer1.addComponent(prixTotal); // Construction globale mainLayout.addComponent(table); mainLayout.addComponent(footer0); mainLayout.addComponent(footer1); // Message spcifique en bas de popup if (param.messageSpecifiqueBottom != null) { labelMessageSpecifiqueBottom = new Label(param.messageSpecifiqueBottom); labelMessageSpecifiqueBottom.addStyleName("popup-integer-grid-message"); mainLayout.addComponent(labelMessageSpecifiqueBottom); } }
From source file:fr.amapj.view.engine.grid.integergrid.PopupIntegerGrid.java
License:Open Source License
private void constructHeaderLine(VerticalLayout mainLayout, GridHeaderLine line) { HorizontalLayout header1 = new HorizontalLayout(); if (line.height != -1) { header1.setHeight(line.height + "px"); }//w ww .ja va2s .co m int index = 0; for (String str : line.cells) { Label dateLabel = new Label(str); dateLabel.setSizeFull(); if (line.styleName != null) { dateLabel.addStyleName(line.styleName); } if (index == 0) { dateLabel.setWidth((param.leftPartLineLargeur + 5) + "px"); } else { dateLabel.setWidth((param.largeurCol + 2) + "px"); } header1.addComponent(dateLabel); index++; } mainLayout.addComponent(header1); }
From source file:fr.amapj.view.views.permanence.detailperiode.grille.ModifierInscriptionGrillePart.java
License:Open Source License
@Override protected Layout addSpecificButton(PeriodePermanenceDateDTO date) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("400px"); hl.setHeight("45px"); Button b = new Button("Modifier inscrits"); b.addStyleName("primary"); b.addClickListener(e -> click(date)); hl.addComponent(b);/* w ww . j a v a2 s .c o m*/ hl.setComponentAlignment(b, Alignment.MIDDLE_CENTER); return hl; }
From source file:fr.amapj.view.views.permanence.grille.BlocGrilleDrawer.java
License:Open Source License
private void draw(VerticalLayout contentLayout, BlocGrille bloc, SizeInfo sizeInfo, AbstractPeriodePermanenceGrillePart grillePart) { // Le titre/*from w w w. ja v a2s . c om*/ HorizontalLayout header1 = new HorizontalLayout(); Label l = new Label(bloc.titre); l.addStyleName(bloc.styleTitre); l.setWidth("400px"); header1.addComponent(l); contentLayout.addComponent(header1); // for (int i = 0; i < bloc.lines.size(); i++) { BlocGrilleLine pc = bloc.lines.get(i); header1 = new HorizontalLayout(); header1.setHeight(sizeInfo.heights[i] + "px"); Label l1 = new Label(pc.col1); l1.setSizeFull(); l1.addStyleName(pc.styleCol1); l1.setWidth("200px"); header1.addComponent(l1); Label l2 = new Label(pc.col2); l2.setSizeFull(); l2.addStyleName(pc.styleCol2); l2.setWidth("200px"); header1.addComponent(l2); contentLayout.addComponent(header1); } // On place ensuite un rectangle vide pour permettre l'alignement des boutons int h = computeHeightAdditionalSpace(sizeInfo, bloc.lines.size()); if (h != 0) { header1 = new HorizontalLayout(); header1.setHeight(h + "px"); contentLayout.addComponent(header1); } // La partie specifique Layout layout = grillePart.addSpecificButton(bloc.date); if (layout != null) { contentLayout.addComponent(layout); } }
From source file:fr.amapj.view.views.permanence.mespermanences.grille.GrilleInscriptionPermanence.java
License:Open Source License
@Override protected Layout addSpecificButton(PeriodePermanenceDateDTO date) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("400px"); hl.setHeight("45px"); boolean isInscrit = date.isInscrit(userId); boolean isComplet = date.isDateComplete(); // Indique si il est encore possible de s'inscire ou non pour cette date boolean isModifiable = MesPermanencesUtils.isDateModifiable(periodePermanenceDTO, date); ////from w w w . j a v a 2 s . c o m if (isModifiable == false) { return null; } switch (periodePermanenceDTO.regleInscription) { case UNE_INSCRIPTION_PAR_DATE: return specificButtonInscriptionUniqueParDate(hl, isInscrit, isComplet, date); case MULTIPLE_INSCRIPTION_SUR_ROLE_DIFFERENT: case TOUT_AUTORISE: return specificButtonInscriptionMultipleParDate(hl, isInscrit, isComplet, date); default: throw new AmapjRuntimeException(); } }
From source file:fr.amapj.view.views.permanence.periode.grille.ModifierPeriodePermanenceGrillePart.java
License:Open Source License
@Override protected Layout addSpecificButton(PeriodePermanenceDateDTO date) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("400px"); hl.setHeight("45px"); Button b = new Button("Modifier"); b.addStyleName("primary"); b.addClickListener(e -> click(date)); hl.addComponent(b);//from ww w . j a v a 2s. c o m hl.setComponentAlignment(b, Alignment.MIDDLE_CENTER); return hl; }
From source file:fr.univlorraine.mondossierweb.views.CalendrierMobileView.java
License:Apache License
public void refresh() { //On vrifie le droit d'accder la vue if (UI.getCurrent() instanceof MdwTouchkitUI && (userController.isEnseignant() || userController.isEtudiant()) && MdwTouchkitUI.getCurrent() != null && MdwTouchkitUI.getCurrent().getEtudiant() != null) { removeAllComponents();/*from w ww .j ava2 s. c o m*/ /* Style */ setMargin(false); setSpacing(false); setSizeFull(); //NAVBAR HorizontalLayout navbar = new HorizontalLayout(); navbar.setSizeFull(); navbar.setHeight("40px"); navbar.setStyleName("navigation-bar"); //Bouton retour if (userController.isEnseignant()) { returnButton = new Button(); returnButton.setIcon(FontAwesome.ARROW_LEFT); //returnButton.setStyleName(ValoTheme.BUTTON_ICON_ONLY); returnButton.setStyleName("v-nav-button"); returnButton.addClickListener(e -> { if (MdwTouchkitUI.getCurrent().getDossierEtuFromView() != null && MdwTouchkitUI.getCurrent() .getDossierEtuFromView().equals(ListeInscritsMobileView.NAME)) { MdwTouchkitUI.getCurrent().navigateToListeInscrits(); } if (MdwTouchkitUI.getCurrent().getDossierEtuFromView() != null && MdwTouchkitUI.getCurrent() .getDossierEtuFromView().equals(RechercheMobileView.NAME)) { MdwTouchkitUI.getCurrent().navigateToRecherche(null); } }); navbar.addComponent(returnButton); navbar.setComponentAlignment(returnButton, Alignment.MIDDLE_LEFT); } //Title Label labelNavBar = new Label(MdwTouchkitUI.getCurrent().getEtudiant().getNom()); labelNavBar.setStyleName("v-label-navbar"); navbar.addComponent(labelNavBar); navbar.setComponentAlignment(labelNavBar, Alignment.MIDDLE_CENTER); navbar.setExpandRatio(labelNavBar, 1); addComponent(navbar); VerticalLayout globalLayout = new VerticalLayout(); //globalLayout.setSizeFull(); globalLayout.setSpacing(true); globalLayout.setMargin(true); globalLayout.setStyleName("v-scrollableelement"); if (MdwTouchkitUI.getCurrent().getEtudiant() != null && MdwTouchkitUI.getCurrent().getEtudiant().getCalendrier() != null && MdwTouchkitUI.getCurrent().getEtudiant().getCalendrier().size() > 0) { List<Examen> listeExam = MdwTouchkitUI.getCurrent().getEtudiant().getCalendrier(); for (Examen exam : listeExam) { Panel panelCalendrier = new Panel(); panelCalendrier.setSizeFull(); HorizontalLayout labelExamenLayout = new HorizontalLayout(); labelExamenLayout.setMargin(true); labelExamenLayout.setSpacing(true); labelExamenLayout.setSizeFull(); //Dtail de l'preuve VerticalLayout detailLayout = new VerticalLayout(); detailLayout.setSizeFull(); //ajout de la date Label dateLabel = new Label(exam.getDatedeb()); dateLabel.setStyleName(ValoTheme.LABEL_BOLD); detailLayout.addComponent(dateLabel); dateLabel.addStyleName("v-label-align-right"); //ajout de l'heure Label heureLabel = new Label(exam.getHeure()); detailLayout.addComponent(heureLabel); heureLabel.setStyleName("v-label-align-right"); //ajout de la salle Label salleLabel = new Label(exam.getLibsalle()); detailLayout.addComponent(salleLabel); salleLabel.setStyleName("v-label-align-right"); //ajout du batiment Label batimentLabel = new Label(exam.getBatiment()); detailLayout.addComponent(batimentLabel); batimentLabel.setStyleName("v-label-align-right"); //Libelle de l'preuve VerticalLayout libelleLayout = new VerticalLayout(); libelleLayout.setSizeFull(); Label libLabel = new Label(exam.getEpreuve()); libLabel.setSizeFull(); libLabel.setStyleName(ValoTheme.LABEL_BOLD); libelleLayout.addComponent(new Label("")); libelleLayout.addComponent(libLabel); //Ajout des 2 layouts dans le layout principal labelExamenLayout.addComponent(detailLayout); labelExamenLayout.addComponent(libelleLayout); //Ajout du layout principal dans le panel panelCalendrier.setContent(labelExamenLayout); //Ajout du panel la vue globalLayout.addComponent(panelCalendrier); } } else { Panel panelCalendrier = new Panel(); panelCalendrier.setSizeFull(); HorizontalLayout labelExamenLayout = new HorizontalLayout(); labelExamenLayout.setMargin(true); labelExamenLayout.setSizeFull(); Label aucunExamen = new Label( applicationContext.getMessage(NAME + ".examen.aucun", null, getLocale())); aucunExamen.setStyleName(ValoTheme.LABEL_COLORED); aucunExamen.addStyleName(ValoTheme.LABEL_BOLD); aucunExamen.setWidth("100%"); aucunExamen.addStyleName("label-centre"); labelExamenLayout.addComponent(aucunExamen); panelCalendrier.setContent(labelExamenLayout); globalLayout.addComponent(panelCalendrier); } addComponent(globalLayout); setExpandRatio(globalLayout, 1); } }
From source file:fr.univlorraine.mondossierweb.views.FavorisMobileView.java
License:Apache License
/** * Initialise la vue//from w ww . j av a 2s .c o m */ @PostConstruct public void init() { //On vrifie le droit d'accder la vue if (UI.getCurrent() instanceof MdwTouchkitUI && userController.isEnseignant()) { removeAllComponents(); /* Style */ setSizeFull(); liste_types_inscrits = new LinkedList<String>(); liste_types_inscrits.add("ELP"); liste_types_inscrits.add("VET"); liste_type_arbo = new LinkedList<String>(); liste_type_arbo.add("CMP"); liste_type_arbo.add("VET"); List<Favoris> lfav = favorisController.getFavoris(); //NAVBAR HorizontalLayout navbar = new HorizontalLayout(); navbar.setSizeFull(); navbar.setHeight("40px"); navbar.setStyleName("navigation-bar"); //Bouton info infoButton = new Button(); infoButton.setIcon(FontAwesome.INFO); infoButton.setStyleName("v-nav-button"); infoButton.addClickListener(e -> { /** * NOUVELLE VERSION */ Notification note = new Notification( applicationContext.getMessage("helpWindowMobile.text.enseignant", null, getLocale()), "", Notification.TYPE_TRAY_NOTIFICATION, true); note.setPosition(Position.MIDDLE_CENTER); note.setDelayMsec(6000); note.show(UI.getCurrent().getPage()); /** * ANCIENNE VERSION */ /* //afficher message HelpMobileWindow hbw = new HelpMobileWindow(applicationContext.getMessage("helpWindowMobile.text.enseignant", null, getLocale()),applicationContext.getMessage("helpWindow.defaultTitle", null, getLocale()),false); UI.getCurrent().addWindow(hbw); */ }); navbar.addComponent(infoButton); navbar.setComponentAlignment(infoButton, Alignment.MIDDLE_LEFT); //Title Label labelFav = new Label(applicationContext.getMessage(NAME + ".title.label", null, getLocale())); labelFav.setStyleName("v-label-navbar"); navbar.addComponent(labelFav); navbar.setComponentAlignment(labelFav, Alignment.MIDDLE_CENTER); //Bouton Search Button searchButton = new Button(); searchButton.setIcon(FontAwesome.SEARCH); searchButton.setStyleName("v-nav-button"); navbar.addComponent(searchButton); navbar.setComponentAlignment(searchButton, Alignment.MIDDLE_RIGHT); searchButton.addClickListener(e -> { ((MdwTouchkitUI) MdwTouchkitUI.getCurrent()).navigateToRecherche(NAME); }); navbar.setExpandRatio(labelFav, 1); addComponent(navbar); VerticalLayout globalLayout = new VerticalLayout(); globalLayout.setSizeFull(); globalLayout.setSpacing(true); globalLayout.setMargin(true); FormLayout labelLayout = new FormLayout(); labelLayout.setSizeFull(); labelLayout.setMargin(false); labelLayout.setSpacing(false); Label infoLabel = new Label(applicationContext.getMessage(NAME + ".info.label", null, getLocale())); infoLabel.setStyleName(ValoTheme.LABEL_SMALL); infoLabel.setIcon(FontAwesome.INFO_CIRCLE); infoLabel.setWidth("100%"); labelLayout.addComponent(infoLabel); globalLayout.addComponent(labelLayout); if (lfav != null && lfav.size() > 0) { if (favorisContientVet(lfav)) { Panel vetPanel = new Panel( applicationContext.getMessage(NAME + ".vetpanel.title", null, getLocale())); vetPanel.setStyleName("centertitle-panel"); vetPanel.addStyleName("v-colored-panel-caption"); vetPanel.setSizeFull(); VerticalLayout vetLayout = new VerticalLayout(); vetLayout.setSizeFull(); vetLayout.setHeight(null); int i = 0; for (Favoris fav : lfav) { if (fav.getId().getTypfav().equals(Utils.VET)) { i++; HorizontalLayout favVetLayout = new HorizontalLayout(); favVetLayout.setSizeFull(); favVetLayout.setMargin(true); favVetLayout.setSpacing(true); favVetLayout.setStyleName("v-layout-multiline"); favVetLayout.setWidth("100%"); favVetLayout.setHeight("100%"); Button codeButton = new Button(fav.getId().getIdfav()); codeButton.setCaption(fav.getId().getIdfav()); Utils.setButtonStyle(codeButton); codeButton.setWidth("90px"); codeButton.addClickListener(e -> { accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav()); }); Button libButton = new Button(favorisController.getLibObjFavori(fav.getId().getTypfav(), fav.getId().getIdfav())); Utils.setButtonStyle(libButton); libButton.setHeight("100%"); libButton.setWidth("100%"); libButton.addClickListener(e -> { accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav()); }); favVetLayout.addComponent(codeButton); //favVetLayout.setComponentAlignment(codeButton, Alignment.MIDDLE_CENTER); favVetLayout.addComponent(libButton); favVetLayout.setComponentAlignment(libButton, Alignment.MIDDLE_CENTER); favVetLayout.setExpandRatio(libButton, 1); vetLayout.addComponent(favVetLayout); if (i > 1) { favVetLayout.addStyleName("line-separator"); } } } vetPanel.setContent(vetLayout); globalLayout.addComponent(vetPanel); } if (favorisContientElp(lfav)) { Panel elpPanel = new Panel( applicationContext.getMessage(NAME + ".elppanel.title", null, getLocale())); elpPanel.setStyleName("centertitle-panel"); elpPanel.addStyleName("v-colored-panel-caption"); elpPanel.setSizeFull(); VerticalLayout elpLayout = new VerticalLayout(); elpLayout.setSizeFull(); elpLayout.setHeight(null); int i = 0; for (Favoris fav : lfav) { if (fav.getId().getTypfav().equals(Utils.ELP)) { i++; HorizontalLayout favElpLayout = new HorizontalLayout(); favElpLayout.setSizeFull(); favElpLayout.setMargin(true); favElpLayout.setSpacing(true); favElpLayout.setStyleName("v-layout-multiline"); favElpLayout.setWidth("100%"); favElpLayout.setHeight("100%"); Button codeButton = new Button(fav.getId().getIdfav()); Utils.setButtonStyle(codeButton); codeButton.setWidth("90px"); codeButton.addClickListener(e -> { accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav()); }); Button libButton = new Button(favorisController.getLibObjFavori(fav.getId().getTypfav(), fav.getId().getIdfav())); Utils.setButtonStyle(libButton); libButton.setHeight("100%"); libButton.setWidth("100%"); libButton.addClickListener(e -> { accessToDetail(fav.getId().getIdfav(), fav.getId().getTypfav()); }); favElpLayout.addComponent(codeButton); favElpLayout.addComponent(libButton); favElpLayout.setComponentAlignment(libButton, Alignment.MIDDLE_CENTER); favElpLayout.setExpandRatio(libButton, 1); elpLayout.addComponent(favElpLayout); if (i > 1) { favElpLayout.addStyleName("line-separator"); } } } elpPanel.setContent(elpLayout); globalLayout.addComponent(elpPanel); } } labelAucunFavoriLayout = new HorizontalLayout(); labelAucunFavoriLayout.setMargin(true); labelAucunFavoriLayout.setSizeFull(); Button aucunFavoris = new Button( applicationContext.getMessage(NAME + ".favoris.aucun", null, getLocale())); aucunFavoris.setStyleName("v-nav-button"); aucunFavoris.addStyleName(ValoTheme.BUTTON_LINK); aucunFavoris.addClickListener(e -> { ((MdwTouchkitUI) MdwTouchkitUI.getCurrent()).navigateToRecherche(NAME); }); labelAucunFavoriLayout.addComponent(aucunFavoris); labelAucunFavoriLayout.setVisible(false); globalLayout.addComponent(labelAucunFavoriLayout); if (lfav == null || lfav.size() == 0) { labelAucunFavoriLayout.setVisible(true); } //addComponent(globalLayout); contentLayout.setStyleName("v-scrollableelement"); contentLayout.addComponent(globalLayout); addComponent(contentLayout); setExpandRatio(contentLayout, 1); } }