List of usage examples for com.vaadin.server FontAwesome BOOK
FontAwesome BOOK
To view the source code for com.vaadin.server FontAwesome BOOK.
Click Source Link
From source file:annis.gui.HelpPanel.java
License:Apache License
public HelpPanel(AnnisUI ui) { setSizeFull();//from www . j a va 2 s. c om tutorial = new TutorialPanel(); tutorial.setHeight("99%"); examples = new ExampleQueriesPanel(ui, this); examples.setHeight("99%"); addTab(tutorial, "Tutorial", FontAwesome.BOOK); addTab(examples, "Example Queries", FontAwesome.LIST_ALT); setSelectedTab(examples); addStyleName("help-tab"); }
From source file:com.cavisson.gui.dashboard.components.controls.ValoThemeUI.java
License:Apache License
Component buildTestMenu() { final CssLayout menu = new CssLayout(); menu.addStyleName("large-icons"); final Label logo = new Label("Va"); logo.setSizeUndefined();//from w ww.j av a2 s .co m logo.setPrimaryStyleName("valo-menu-logo"); menu.addComponent(logo); Button b = new Button("Reference <span class=\"valo-menu-badge\">3</span>"); b.setIcon(FontAwesome.TH_LIST); b.setPrimaryStyleName("valo-menu-item"); b.addStyleName("selected"); b.setHtmlContentAllowed(true); menu.addComponent(b); b = new Button("API"); b.setIcon(FontAwesome.BOOK); b.setPrimaryStyleName("valo-menu-item"); menu.addComponent(b); b = new Button("Examples <span class=\"valo-menu-badge\">12</span>"); b.setIcon(FontAwesome.TABLE); b.setPrimaryStyleName("valo-menu-item"); b.setHtmlContentAllowed(true); menu.addComponent(b); return menu; }
From source file:com.etest.view.systemadministration.syllabus.SyllabusFormWindow.java
Component buildSyllabusForms() { FormLayout form = new FormLayout(); form.setWidth("100%"); form.setMargin(true);//from w ww. ja va 2 s. com subjects.setCaption("Subject: "); subjects.setWidth("50%"); subjects.setIcon(FontAwesome.BOOK); subjects.addStyleName(ValoTheme.COMBOBOX_SMALL); form.addComponent(subjects); topicNo.setCaption("Topic No: "); topicNo.setWidth("50%"); topicNo.setIcon(FontAwesome.TAG); topicNo.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(topicNo); topic.setCaption("Topic: "); topic.setWidth("100%"); topic.setIcon(FontAwesome.TAG); topic.setInputPrompt("Enter Topic.."); topic.setRows(3); topic.addStyleName(ValoTheme.TEXTAREA_SMALL); form.addComponent(topic); estimatedTime.setCaption("Estimated Time: "); estimatedTime.setWidth("50%"); estimatedTime.setIcon(FontAwesome.TAG); estimatedTime.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(estimatedTime); Button save = new Button("SAVE"); save.setWidth("50%"); save.setIcon(FontAwesome.SAVE); save.addStyleName(ValoTheme.BUTTON_PRIMARY); save.addStyleName(ValoTheme.BUTTON_SMALL); save.addClickListener(buttonClickListener); Button update = new Button("UPDATE"); update.setWidth("60%"); update.setIcon(FontAwesome.PENCIL); update.addStyleName(ValoTheme.BUTTON_PRIMARY); update.addStyleName(ValoTheme.BUTTON_SMALL); update.addClickListener(buttonClickListener); Button remove = new Button("REMOVE"); remove.setWidth("60%"); remove.setIcon(FontAwesome.TRASH_O); remove.addStyleName(ValoTheme.BUTTON_PRIMARY); remove.addStyleName(ValoTheme.BUTTON_SMALL); remove.addClickListener(buttonClickListener); if (getSyllabusId() != 0) { s = ss.getSyllabusById(syllabusId); subjects.setValue(s.getCurriculumId()); topicNo.setValue(String.valueOf(s.getTopicNo())); estimatedTime.setValue(String.valueOf(s.getEstimatedTime())); topic.setValue(s.getTopic()); if (getButtonCaption().equals("edit")) { form.addComponent(update); } else { form.addComponent(remove); } } else { form.addComponent(save); } return form; }
From source file:com.etest.view.tq.TQCoverageUI.java
Component buildTQCoverageForms() { FormLayout form = new FormLayout(); form.setWidth("500px"); examTitle.setCaption("Exam Title: "); examTitle.setWidth("100%"); examTitle.setIcon(FontAwesome.TAG);//from ww w .j ava 2s . c o m examTitle.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(examTitle); subject.setCaption("Subject: "); subject.setWidth("100%"); subject.setIcon(FontAwesome.BOOK); subject.addStyleName(ValoTheme.COMBOBOX_SMALL); subject.addValueChangeListener((new CurriculumPropertyChangeListener(topic))); form.addComponent(subject); totalItems.setCaption("No. of Test Items: "); totalItems.setWidth("50%"); totalItems.setValue("0"); totalItems.setIcon(FontAwesome.TAG); totalItems.addStyleName(ValoTheme.TEXTFIELD_SMALL); totalItems.addValueChangeListener(fieldValueListener); form.addComponent(totalItems); Button button = new Button("ADD ROW"); button.setWidth("50%"); button.setIcon(FontAwesome.GEAR); button.addStyleName(ValoTheme.BUTTON_PRIMARY); button.addStyleName(ValoTheme.BUTTON_SMALL); button.addClickListener((Button.ClickEvent event) -> { if (examTitle.getValue() == null || examTitle.getValue().trim().isEmpty()) { Notification.show("Select an Exam Title!", Notification.Type.WARNING_MESSAGE); return; } if (subject.getValue() == null) { Notification.show("Select a Subject!", Notification.Type.WARNING_MESSAGE); return; } if (totalItems.getValue() == null || totalItems.getValue().trim().isEmpty()) { Notification.show("Enter No. of Test Items!", Notification.Type.WARNING_MESSAGE); return; } grid.addRow(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "del"); }); form.addComponent(button); return form; }
From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java
private void addressGroup() { addressGroup = new VerticalComponentGroup(); addressGroup.setSizeUndefined();//www. j a v a 2 s. co m addTab(addressGroup, "", FontAwesome.BOOK); tel = new TextField(""); tel.setInputPrompt(""); tel.setImmediate(false); tel.setWidth("-1px"); tel.setHeight("-1px"); tel.setNullRepresentation(""); addressGroup.addComponent(tel); mobile = new TextField(""); mobile.setInputPrompt(""); mobile.setImmediate(false); mobile.setWidth("-1px"); mobile.setHeight("-1px"); mobile.setRequired(true); mobile.setNullRepresentation(""); addressGroup.addComponent(mobile); email = new EmailField(""); email.setInputPrompt(""); email.setImmediate(false); email.setWidth("-1px"); email.setHeight("-1px"); email.setRequired(true); email.setNullRepresentation(""); email.addTextChangeListener(new TextChangeListener() { private static final long serialVersionUID = 1L; @Override public void textChange(TextChangeEvent event) { if (!isEdit) { if (event.getText() != null) { if (event.getText().length() >= 13) { userSqlContainer.addContainerFilter(new Equal(UserSchema.EMAIL, event.getText())); if (userSqlContainer.size() > 0) { disableDuplicateEmailForm(); Notification.show( "?? ??", Type.WARNING_MESSAGE); } else { enableDuplicateEmailForm(); } userSqlContainer.removeAllContainerFilters(); } } } } }); addressGroup.addComponent(email); Label currentLabel = new Label(""); addressGroup.addComponent(currentLabel); currentAddress = new TextArea(""); currentAddress.setInputPrompt(" "); currentAddress.setImmediate(false); currentAddress.setWidth("-1px"); currentAddress.setHeight("-1px"); currentAddress.setNullRepresentation(""); addressGroup.addComponent(currentAddress); currentProvince = new NativeSelect("", new Province()); //currentProvince.setInputPrompt("??"); currentProvince.setItemCaptionPropertyId("name"); currentProvince.setImmediate(true); currentProvince.setNullSelectionAllowed(false); currentProvince.setWidth("-1px"); currentProvince.setHeight("-1px"); //currentProvince.setFilteringMode(FilteringMode.CONTAINS); currentProvince.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) currentDistrict.setContainerDataSource( new District(Integer.parseInt(event.getProperty().getValue().toString()))); } }); addressGroup.addComponent(currentProvince); currentDistrict = new NativeSelect(""); //currentDistrict.setInputPrompt("??"); currentDistrict.setItemCaptionPropertyId("name"); currentDistrict.setImmediate(true); currentDistrict.setNullSelectionAllowed(false); currentDistrict.setWidth("-1px"); currentDistrict.setHeight("-1px"); //currentDistrict.setFilteringMode(FilteringMode.CONTAINS); currentDistrict.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { currentCity.setContainerDataSource( new City(Integer.parseInt(event.getProperty().getValue().toString()))); currentPostcode.setContainerDataSource( new Postcode(Integer.parseInt(event.getProperty().getValue().toString()))); } } }); addressGroup.addComponent(currentDistrict); currentCity = new NativeSelect(""); //currentCity.setInputPrompt("??"); currentCity.setItemCaptionPropertyId("name"); currentCity.setImmediate(true); currentCity.setNullSelectionAllowed(false); currentCity.setWidth("-1px"); currentCity.setHeight("-1px"); //currentCity.setFilteringMode(FilteringMode.CONTAINS); addressGroup.addComponent(currentCity); currentPostcode = new NativeSelect(""); //currentPostcode.setInputPrompt("??"); currentPostcode.setItemCaptionPropertyId("name"); currentPostcode.setImmediate(true); currentPostcode.setNullSelectionAllowed(false); currentPostcode.setWidth("-1px"); currentPostcode.setHeight("-1px"); //currentPostcode.setFilteringMode(FilteringMode.CONTAINS); addressGroup.addComponent(currentPostcode); isSameCurrentAddress = new CheckBox( "?"); isSameCurrentAddress.setImmediate(true); isSameCurrentAddress.setWidth("-1px"); isSameCurrentAddress.setHeight("-1px"); isSameCurrentAddress.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { if ((boolean) event.getProperty().getValue()) { censusAddress.setValue(currentAddress.getValue()); censusProvince.setValue(currentProvince.getValue()); censusDistrict.setValue(currentDistrict.getValue()); censusCity.setValue(currentCity.getValue()); censusPostcode.setValue(currentPostcode.getValue()); } else { censusAddress.setValue(null); censusProvince.setValue(null); censusDistrict.setValue(null); censusCity.setValue(null); censusPostcode.setValue(null); } } } }); addressGroup.addComponent(isSameCurrentAddress); censusAddress = new TextArea(""); censusAddress.setInputPrompt(" "); censusAddress.setImmediate(false); censusAddress.setWidth("-1px"); censusAddress.setHeight("-1px"); censusAddress.setNullRepresentation(""); addressGroup.addComponent(censusAddress); censusProvince = new NativeSelect("", new Province()); //censusProvince.setInputPrompt("??"); censusProvince.setItemCaptionPropertyId("name"); censusProvince.setImmediate(true); censusProvince.setNullSelectionAllowed(false); censusProvince.setWidth("-1px"); censusProvince.setHeight("-1px"); //censusProvince.setFilteringMode(FilteringMode.CONTAINS); censusProvince.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) censusDistrict.setContainerDataSource( new District(Integer.parseInt(event.getProperty().getValue().toString()))); } }); addressGroup.addComponent(censusProvince); censusDistrict = new NativeSelect(""); //censusDistrict.setInputPrompt("??"); censusDistrict.setItemCaptionPropertyId("name"); censusDistrict.setImmediate(true); censusDistrict.setNullSelectionAllowed(false); censusDistrict.setWidth("-1px"); censusDistrict.setHeight("-1px"); //censusDistrict.setFilteringMode(FilteringMode.CONTAINS); censusDistrict.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { censusCity.setContainerDataSource( new City(Integer.parseInt(event.getProperty().getValue().toString()))); censusPostcode.setContainerDataSource( new Postcode(Integer.parseInt(event.getProperty().getValue().toString()))); } } }); addressGroup.addComponent(censusDistrict); censusCity = new NativeSelect(""); //censusCity.setInputPrompt("??"); censusCity.setItemCaptionPropertyId("name"); censusCity.setImmediate(true); censusCity.setNullSelectionAllowed(false); censusCity.setWidth("-1px"); censusCity.setHeight("-1px"); //censusCity.setFilteringMode(FilteringMode.CONTAINS); addressGroup.addComponent(censusCity); censusPostcode = new NativeSelect( ""); //censusPostcode.setInputPrompt("??"); censusPostcode.setItemCaptionPropertyId("name"); censusPostcode.setImmediate(true); censusPostcode.setNullSelectionAllowed(false); censusPostcode.setWidth("-1px"); censusPostcode.setHeight("-1px"); //censusPostcode.setFilteringMode(FilteringMode.CONTAINS); addressGroup.addComponent(censusPostcode); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); addressGroup.addComponent(buttonLayout); licensessBack = new Button(FontAwesome.ARROW_LEFT); licensessBack.setWidth("100%"); licensessBack.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(licenseeGroup); } }); buttonLayout.addComponents(licensessBack); fatherNext = new Button(FontAwesome.SAVE); fatherNext.setWidth("100%"); fatherNext.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { ConfirmDialog.show(UI.getCurrent(), "", "? ?", "", "", new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; public void onClose(ConfirmDialog dialog) { /* ? * ? ? * ? ?? */ if (dialog.isConfirmed()) { isInsertParents = true; setSelectedTab(fatherGroup); } else { isInsertParents = false; finish.click(); } } }); } }); buttonLayout.addComponents(fatherNext); }
From source file:com.javalego.store.environment.BaseEnvironment.java
@Override public synchronized Collection<RepositoryIcons<Icon>> getRepositoriesIcons() throws LocalizedException { if (repositories != null) { return repositories; }/*from w ww . j a va 2s . co m*/ repositories = new ArrayList<RepositoryIcons<Icon>>(); // Iconos de redes sociales usando FonAwesome icons. FontAwesomeIcons fa = FontAwesomeIcons.getCurrent(); fa.addIcon(MenuIcons2.BOOK, FontAwesome.BOOK); fa.addIcon(MenuIcons2.MONITOR, FontAwesome.DESKTOP); fa.addIcon(MenuIcons2.SOURCECODE, FontAwesome.CODE); fa.addIcon(MenuIcons2.GITHUB, FontAwesome.GITHUB); fa.addIcon(MenuIcons2.METRICS, FontAwesome.BAR_CHART_O); fa.addIcon(MenuIcons2.WEB, FontAwesome.GLOBE); fa.addIcon(MenuIcons2.TWITTER, FontAwesome.TWITTER); fa.addIcon(MenuIcons2.FORUM, FontAwesome.USERS); fa.addIcon(MenuIcons2.BLOG, FontAwesome.WORDPRESS); fa.addIcon(MenuIcons2.LINKEDIN, FontAwesome.LINKEDIN); fa.addIcon(MenuIcons2.FACEBOOK, FontAwesome.FACEBOOK); fa.addIcon(MenuIcons2.GOOGLEPLUS, FontAwesome.GOOGLE_PLUS); fa.addIcon(MenuIcons2.EMAIL, FontAwesome.ENVELOPE); fa.addIcon(MenuIcons2.TOOLS, FontAwesome.COGS); fa.addIcon(MenuIcons2.LICENSE, FontAwesome.FILE); // Resto de iconos ResourceIconsVaadin rep = ResourceIconsVaadin.getCurrent(); //rep.setLocale(Locale.US); rep.load(MenuIcons.class, "/menu_icons"); rep.load(MenuIcons2.class, "/menu_icons2"); rep.load(ProviderIcons.class, "/provider_icons"); rep.load(IconEditor.class, "/icons_editor"); repositories.add(fa); repositories.add(rep); return repositories; }
From source file:com.kpg.diary.ui.MenuLayout.java
License:Apache License
/** * Builds the menu./* ww w .ja va 2 s . c om*/ * * @param navigator * the navigator * @return the css layout */ private CssLayout buildMenu(Navigator navigator) { // Add items menuItemsMap(); HorizontalLayout top = new HorizontalLayout(); top.setWidth("100%"); top.addStyleName(ValoTheme.MENU_TITLE); top.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); top.addStyleName(ValoTheme.MENU_TITLE); menu.addComponent(top); // menu.addComponent(createThemeSelect()); menu.addComponent(top); Button showMenu = new Button("Menu", new ClickListener() { @Override public void buttonClick(ClickEvent event) { if (menu.getStyleName().contains("valo-menu-visible")) { menu.removeStyleName("valo-menu-visible"); } else { menu.addStyleName("valo-menu-visible"); } } }); showMenu.addStyleName(ValoTheme.BUTTON_PRIMARY); showMenu.addStyleName(ValoTheme.BUTTON_SMALL); showMenu.addStyleName("valo-menu-toggle"); showMenu.setIcon(FontAwesome.LIST); menu.addComponent(showMenu); Label title = new Label("<h2>Diary</h2>", ContentMode.HTML); title.setSizeUndefined(); top.addComponent(title); top.setExpandRatio(title, 1); menuItemsLayout.setPrimaryStyleName("valo-menuitems"); menu.addComponent(menuItemsLayout); for (final Entry<String, String> item : menuItems.entrySet()) { Button b = new Button(item.getValue(), new ClickListener() { @Override public void buttonClick(ClickEvent event) { navigator.navigateTo(item.getKey()); } }); b.setHtmlContentAllowed(true); b.setPrimaryStyleName(ValoTheme.MENU_ITEM); if (IConstants.NavigationMenu.ADDRESS.getKey().equals(item.getKey())) { b.setIcon(FontAwesome.BOOK); } else if (IConstants.NavigationMenu.PERSON.getKey().equals(item.getKey())) { b.setIcon(FontAwesome.USER); } else { b.setIcon(FontAwesome.APPLE); } menuItemsLayout.addComponent(b); } return menu; }
From source file:com.terralcode.frontend.vista.widgets.alumno.AlumnoVista.java
private void buildDireccion() { VerticalLayout layoutTabDireccion = new VerticalLayout(); HorizontalLayout direccionLayout = new HorizontalLayout(); direccionField = new TextField("Direccin"); direccion2Field = new TextField("Direccin 2"); ciudadField = new TextField("Ciudad"); provinciaField = new TextField("Provincia"); codigoPostalField = new TextField("Cdigo Postal"); layoutTabDireccion.addComponent(direccionField); layoutTabDireccion.addComponent(direccion2Field); direccionLayout.addComponent(ciudadField); direccionLayout.addComponent(provinciaField); direccionLayout.addComponent(codigoPostalField); layoutTabDireccion.addComponent(direccionLayout); // layoutTabDireccion.addComponent(ciudadField); // layoutTabDireccion.addComponent(provinciaField); // layoutTabDireccion.addComponent(codigoPostalField); tabDatos.addTab(layoutTabDireccion, "Direccin", FontAwesome.BOOK); }
From source file:com.terralcode.frontend.vista.widgets.alumno.AlumnoVista.java
private void buildEstudiosTab() { VerticalLayout layoutTabEstudios = new VerticalLayout(); layoutTabEstudios.addComponent(buildNivelEstudios()); abandonoEstudiosField = new OptionGroup("Estudios finalizados"); abandonoEstudiosField.addItem(Boolean.TRUE); abandonoEstudiosField.setItemCaption(Boolean.TRUE, "Si"); abandonoEstudiosField.addItem(Boolean.FALSE); abandonoEstudiosField.setItemCaption(Boolean.FALSE, "No"); abandonoEstudiosField.addStyleName("horizontal"); layoutTabEstudios.addComponent(abandonoEstudiosField); tabDatos.addTab(layoutTabEstudios, "Estudios", FontAwesome.BOOK); }
From source file:de.fatalix.bookery.view.common.BookDetailLayout.java
License:Open Source License
private HorizontalLayout createImageLayout() { image = new Image(); image.setImmediate(true);/* w w w . j a v a2 s.c om*/ image.setHeight("200px"); image.setWidth("130px"); downloadButton = new Button("download", FontAwesome.DOWNLOAD); downloadButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); downloadButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { loadData(presenter.updateShared(bookEntry, SecurityUtils.getSubject().getPrincipal().toString())); } catch (SolrServerException | IOException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); fileDownloader = new FileDownloader(new StreamResource(new BookStreamSource(null), "blbla.epub")); fileDownloader.extend(downloadButton); sendToKindleButton = new Button("Kindle", FontAwesome.BOOK); sendToKindleButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); sendToKindleButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { presenter.shareBookWithKindle(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); Notification.show("Book is sent to kindle", Notification.Type.HUMANIZED_MESSAGE); loadData(presenter.updateShared(bookEntry, SecurityUtils.getSubject().getPrincipal().toString())); } catch (SolrServerException | IOException | MessagingException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); likeButton = new Button("0 likes", FontAwesome.THUMBS_O_UP); likeButton.addStyleName(ValoTheme.BUTTON_LINK); likeButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { BookEntry updatedEntry = presenter.updateLike(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); loadData(updatedEntry); } catch (SolrServerException | IOException ex) { Notification.show("Unexpected Error!\n" + ex.getMessage(), Notification.Type.ERROR_MESSAGE); logger.error(ex, ex); } } }); watchListButton = new Button("merken", FontAwesome.STAR_O); watchListButton.addStyleName(ValoTheme.BUTTON_LINK); watchListButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { presenter.addRemoveFromWatchList(bookEntry, SecurityUtils.getSubject().getPrincipal().toString()); loadData(bookEntry); } }); downloadCount = new Label("0 downloads"); VerticalLayout rightLayout = new VerticalLayout(sendToKindleButton, downloadButton, watchListButton, likeButton, downloadCount); rightLayout.setComponentAlignment(downloadCount, Alignment.MIDDLE_CENTER); rightLayout.setSpacing(true); HorizontalLayout layout = new HorizontalLayout(image, rightLayout); layout.setSpacing(true); return layout; }