List of usage examples for com.vaadin.ui VerticalLayout setStyleName
@Override public void setStyleName(String style)
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initProfileOptions() { profileButton = new LifetimeButtonLink("Account", FontAwesome.USER); profileButton.addClickListener(this); profileButton.addFocusListener(this); AddPhotoButton addPhotoButton = new AddPhotoButton(userId, language); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); options.addComponent(addPhotoButton); options.setComponentAlignment(addPhotoButton, Alignment.MIDDLE_CENTER); menu.put(profileButton, options);//from w w w . j a v a2s . co m //secondary.addComponent(profileOptions); }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initAchievementsOptions() { achievementsButton = new LifetimeButtonLink("Achievements", FontAwesome.TROPHY); achievementsButton.addClickListener(this); achievementsButton.addFocusListener(this); ShowAchievementsButton showAchievements = new ShowAchievementsButton(userId, language); ViewCVButton cvButton = new ViewCVButton(userId, language); ShowCertificatesButton certsButton = new ShowCertificatesButton(userId, language); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); options.addComponent(showAchievements); options.addComponent(cvButton);/*from w w w. j a va2s . c o m*/ options.addComponent(certsButton); menu.put(achievementsButton, options); //secondary.addComponent(achievementOptions); }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initJobOffersOptions() { jobOffersButton = new LifetimeButtonLink("Job Offers", FontAwesome.SUITCASE); jobOffersButton.addClickListener(this); jobOffersButton.addFocusListener(this); ViewJobOfferButton viewJobOffersButton = new ViewJobOfferButton(userId, language); AddJobOfferButton addJobOfferButton = new AddJobOfferButton(userId, language); VerticalLayout options = new VerticalLayout(viewJobOffersButton, addJobOfferButton); options.setStyleName("v-menu-options"); menu.put(jobOffersButton, options);/*w w w .j a v a 2 s .c o m*/ }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initJobApplicationsOptions() { jobApplicationsButton = new LifetimeButtonLink("Job Applications", FontAwesome.ARCHIVE); jobApplicationsButton.addClickListener(this); jobApplicationsButton.addFocusListener(this); ViewJobApplicationsButton viewJobApplicationButton = new ViewJobApplicationsButton(userId, language); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); options.addComponent(viewJobApplicationButton); menu.put(jobApplicationsButton, options); }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initOrganizationsOptions() { organizationsButton = new LifetimeButtonLink("Organizations", FontAwesome.BUILDING); organizationsButton.addClickListener(this); organizationsButton.addFocusListener(this); ViewOrganizationsButton viewOrganizationsButton = new ViewOrganizationsButton(userId, language); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); options.addComponent(viewOrganizationsButton); menu.put(organizationsButton, options); }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initShareOptions() { shareButton = new LifetimeButtonLink("Share", FontAwesome.SHARE); shareButton.addClickListener(this); shareButton.addFocusListener(this); FacebookPostButton facebookPostButton = new FacebookPostButton(userId, language); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); options.addComponent(facebookPostButton); menu.put(shareButton, options);/*from w w w . j a va2s .c o m*/ }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initHelpOptions() { helpButton = new LifetimeButtonLink("Help", FontAwesome.QUESTION); helpButton.addClickListener(this); helpButton.addFocusListener(this); VerticalLayout options = new VerticalLayout(); options.setStyleName("v-menu-options"); menu.put(helpButton, options);// w ww .j a v a 2 s.co m }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initLanguageOptions() { languageButton = new LifetimeButtonLink("Languages", FontAwesome.FLAG); languageButton.addClickListener(this); languageButton.addFocusListener(this); missingTranslationsButton = new TranslateButton(userId, language); missingTranslationsButton.addClickListener(this); missingTranslationsButton.addFocusListener(this); languages = new UserLanguages(userId, language); VerticalLayout options = new VerticalLayout(missingTranslationsButton, languages); options.setStyleName("v-menu-options"); menu.put(languageButton, options);/* ww w . j a v a 2 s. c om*/ }
From source file:ui.menu.LifetimeMenu.java
License:Apache License
private void initMoreMenuOptions() { menuButton = new LifetimeButtonLink("More", FontAwesome.NAVICON); menuButton.addClickListener(this); logoutButton = new LogoutButton(userId, language); lightsOnButton = new LightsOnOffButton(language); VerticalLayout options = new VerticalLayout(logoutButton, lightsOnButton); options.setStyleName("v-menu-options"); menu.put(menuButton, options);// w ww . ja v a 2 s. c o m }
From source file:uicomponents.BarcodePreviewComponent.java
License:Open Source License
public BarcodePreviewComponent(SampleToBarcodeFieldTranslator translator) { this.translator = translator; setSpacing(true);/* ww w.j a v a2s.co m*/ setMargin(true); Resource res = new ThemeResource("img/qrtest.png"); Image qr = new Image(null, res); qr.setHeight("140px"); qr.setWidth("140px"); Image qr2 = new Image(null, res); qr2.setHeight("140px"); qr2.setWidth("140px"); code = new TextField(); info1 = new TextField(); info2 = new TextField(); codedName = new OptionGroup("Put ID on sticker:"); codedName.addItems(Arrays.asList("QBiC ID", "Lab ID", "Secondary Name")); codedName.setImmediate(true); codedName.addStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL); codedName.select("QBiC ID"); code.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS); code.setWidth("200px"); code.addStyleName("barcode-large"); styleInfoField(info1); styleInfoField(info2); styleInfoField(qbicInfo); VerticalLayout box = new VerticalLayout(); box.setHeight("110px"); box.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP); box.addComponent(code); box.addComponent(info1); box.addComponent(info2); box.addComponent(qbicInfo); box.setWidth("190px"); HorizontalLayout test = new HorizontalLayout(); test.setSizeFull(); test.addComponent(qr); test.addComponent(box); test.addComponent(qr2); setFieldsReadOnly(true); List<String> options = new ArrayList<String>(Arrays.asList("Tissue/Extr. Material", "Secondary Name", "QBiC ID", "Lab ID", "MHC Type", "Used Antibody")); select1 = new ComboBox("First Info", options); select1.setStyleName(Styles.boxTheme); select1.setImmediate(true); select1.select("Tissue/Extr. Material"); select2 = new ComboBox("Second Info", options); select2.select("Secondary Name"); select2.setImmediate(true); select2.setStyleName(Styles.boxTheme); ValueChangeListener vc = new ValueChangeListener() { /** * */ private static final long serialVersionUID = -7466519211904860012L; @Override public void valueChange(ValueChangeEvent event) { refresh(); } }; codedName.addValueChangeListener(vc); select1.addValueChangeListener(vc); select2.addValueChangeListener(vc); HorizontalLayout designBox = new HorizontalLayout(); designBox.addComponent(select1); designBox.addComponent(select2); designBox.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); designBox.setSpacing(true); VerticalLayout previewBox = new VerticalLayout(); previewBox.setStyleName(ValoTheme.LAYOUT_CARD); previewBox.setCaption("Barcode Example"); previewBox.addComponent(test); addComponent(previewBox); addComponent(codedName); addComponent(designBox); // overwrite = new CheckBox("Overwrite existing Tube Barcode Files"); // addComponent(ProjectwizardUI.questionize(overwrite, // "Overwrites existing files of barcode stickers. This is useful when " // + "the design was changed after creating them.", "Overwrite Sticker Files")); }