private void addNavigation() { userLabel = new Label(); userLabel.setSizeFull(); HorizontalLayout informtaion = new HorizontalLayout(); informtaion.addComponent(userLabel); HorizontalLayout navigation = new HorizontalLayout(); navigation.addComponents( btnAdverts, btnLogin, btnRegistration, btnAdvertReg, btnMyAccout, btnAdminAccount, btnLogout); HorizontalLayout languages = new HorizontalLayout(); languages.addComponents(btnHun, btnEng); HorizontalLayout headersplitter = new HorizontalLayout(); headersplitter.addComponents(informtaion, navigation, languages); headersplitter.setWidth(i18Helper.getMessage("size_100")); headersplitter.setComponentAlignment(informtaion, Alignment.TOP_LEFT); headersplitter.setComponentAlignment(navigation, Alignment.TOP_CENTER); headersplitter.setComponentAlignment(languages, Alignment.TOP_RIGHT); header.addComponent(headersplitter); header.setComponentAlignment(headersplitter, Alignment.TOP_CENTER); }
private void BuildBranding() { branding.setSizeUndefined(); branding.addStyleName("branding"); branding.addStyleName("menu"); Button b = new NativeButton(); b.addStyleName("icon-dashboard"); b.setSizeFull(); b.addClickListener( new ClickListener() { @Override public void buttonClick(ClickEvent event) { clearMenuSelection(menu); event.getButton().addStyleName("selected"); if (!navegador.getState().equals("/dashboard")) navegador.navigateTo("/dashboard"); } }); viewNameToMenuButton.put("/dashboard", b); viewNameToMenuButton.get("/dashboard").setHtmlContentAllowed(true); viewNameToMenuButton.get("/dashboard").setCaption("<span class=\"badge\">2</span>"); Label logo = new Label("Zombre <span>Underwear</span>", ContentMode.HTML); logo.setSizeFull(); branding.addComponent(b); // branding.addComponent(logo); }