List of usage examples for com.vaadin.server FontAwesome PLUS_CIRCLE
FontAwesome PLUS_CIRCLE
To view the source code for com.vaadin.server FontAwesome PLUS_CIRCLE.
Click Source Link
From source file:com.mycollab.module.project.ui.components.TagViewComponent.java
License:Open Source License
private Button createAddTagBtn() { final MButton addTagBtn = new MButton(UserUIContext.getMessage(TagI18nEnum.ACTION_ADD)) .withIcon(FontAwesome.PLUS_CIRCLE).withStyleName(WebThemes.BUTTON_LINK); addTagBtn.addClickListener(clickEvent -> { removeComponent(addTagBtn);//from ww w. j a v a2s . c o m addComponent(createSaveTagComp()); }); return addTagBtn; }
From source file:com.mycollab.module.project.view.ProjectModule.java
License:Open Source License
@Override public MHorizontalLayout buildMenu() { if (serviceMenuContainer == null) { serviceMenuContainer = new MHorizontalLayout().withHeight("45px") .withMargin(new MarginInfo(false, true, false, true)).withStyleName("service-menu"); serviceMenuContainer.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); MButton boardBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_BOARD), clickEvent -> {/* w ww . jav a 2s.c o m*/ EventBusFactory.getInstance().post(new ProjectEvent.GotoUserDashboard(this, null)); }); serviceMenuContainer.with(boardBtn); Button switchPrjBtn = new SwitchProjectPopupButton(); serviceMenuContainer.with(switchPrjBtn); if (!SiteConfiguration.isCommunityEdition()) { MButton clientBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_CLIENTS), clickEvent -> { EventBusFactory.getInstance().post(new ClientEvent.GotoList(this, null)); }); MButton reportBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_REPORTS), clickEvent -> { EventBusFactory.getInstance().post(new ReportEvent.GotoConsole(this)); }); serviceMenuContainer.with(clientBtn, reportBtn); } PopupButton newBtn = new PopupButton(UserUIContext.getMessage(GenericI18Enum.ACTION_NEW)); newBtn.addStyleName("add-btn-popup"); newBtn.setIcon(FontAwesome.PLUS_CIRCLE); OptionPopupContent contentLayout = new OptionPopupContent(); MButton newPrjButton = new MButton(UserUIContext.getMessage(ProjectI18nEnum.SINGLE), clickEvent -> { UI.getCurrent().addWindow(ViewManager.getCacheComponent(AbstractProjectAddWindow.class)); newBtn.setPopupVisible(false); }).withIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.PROJECT)); contentLayout.addOption(newPrjButton); newBtn.setContent(contentLayout); newBtn.setVisible(UserUIContext.canBeYes(RolePermissionCollections.CREATE_NEW_PROJECT)); serviceMenuContainer.with(newBtn).withAlign(newBtn, Alignment.MIDDLE_LEFT); } return serviceMenuContainer; }
From source file:com.toptal.ui.CrudToolbar.java
License:Open Source License
/** * Ctor./*from www.j a va 2 s. c o m*/ * @param crud Crud implementation. * @param components Additional components. */ public CrudToolbar(final Crud crud, final Component... components) { super(); this.add = new MButton(FontAwesome.PLUS_CIRCLE, e -> crud.add()); this.edit = new MButton(FontAwesome.PENCIL_SQUARE_O, e -> crud.edit()); this.delete = new MButton(FontAwesome.MINUS_CIRCLE, e -> crud.delete()); this.refresh = new MButton(FontAwesome.REFRESH, e -> crud.update()); this.addComponents(this.add, this.edit, this.delete, this.refresh); this.addComponents(components); this.setEditAndDeleteEnabled(false); }
From source file:ed.cracken.pos.ui.purchases.PurchaserView.java
/** * top bar includes product's code/* w w w . j a v a2 s . c om*/ * * @return */ public HorizontalLayout createTopBar() { productCode = new TextField(); productCode.setStyleName("filter-textfield"); productCode.setInputPrompt("Codigo Producto"); productCode.setImmediate(true); productCode.addTextChangeListener((FieldEvents.TextChangeEvent event) -> { if (!event.getText().isEmpty()) { viewLogic.findAndAddProduct(event.getText()); } }); productName = new TextField(); productPrice = new TextField(); productQuantity = new TextField(); addProductBtn = new Button("Buscar"); addProductBtn.setIcon(FontAwesome.SEARCH); addProductBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); addProductBtn.setIcon(FontAwesome.PLUS_CIRCLE); addProductBtn.addClickListener((Button.ClickEvent event) -> { if (!productCode.getValue().isEmpty()) { viewLogic.findAndAddProduct(productCode.getValue()); } }); HorizontalLayout topLayout = new HorizontalLayout(productCode, addProductBtn); topLayout.setStyleName("top-bar"); topLayout.setSpacing(true); return topLayout; }
From source file:ed.cracken.pos.ui.seller.SellerView.java
/** * top bar includes product's code//from ww w . j ava 2 s . c om * * @return */ public HorizontalLayout createTopBar() { productCode = new TextField(); productCode.setStyleName("filter-textfield"); productCode.setInputPrompt("Codigo Producto"); productCode.setImmediate(true); productCode.addTextChangeListener((FieldEvents.TextChangeEvent event) -> { if (!event.getText().isEmpty()) { viewLogic.findAndAddProduct(event.getText()); } }); addProductBtn = new Button("Buscar"); addProductBtn.setIcon(FontAwesome.SEARCH); addProductBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); addProductBtn.setIcon(FontAwesome.PLUS_CIRCLE); addProductBtn.addClickListener((Button.ClickEvent event) -> { if (!productCode.getValue().isEmpty()) { viewLogic.findAndAddProduct(productCode.getValue()); } }); HorizontalLayout topLayout = new HorizontalLayout(productCode, addProductBtn); topLayout.setStyleName("top-bar"); topLayout.setSpacing(true); return topLayout; }
From source file:io.github.jikuja.vaadin_yamapa.ui.views.PoiMap.java
License:Creative Commons License
/** * Adds markers to the map/*from w ww. j av a2s . c o m*/ */ private void addMarks() { for (Object iid : items.getItemIds()) { // new marker being added by someone if (iid instanceof TemporaryRowId) { Item item = items.getItem(iid); double lat = (Double) item.getItemProperty("LAT").getValue(); double lon = (Double) item.getItemProperty("LONG").getValue(); LMarker marker = new LMarker(lat, lon); marker.setIcon(FontAwesome.PLUS_CIRCLE); marker.addStyleName("temp-marker"); map.addComponent(marker); // persistent / saved markers } else { Item item = items.getItem(iid); double lat = (Double) item.getItemProperty("LAT").getValue(); double lon = (Double) item.getItemProperty("LONG").getValue(); LMarker marker = new LMarker(lat, lon); marker.addClickListener(event -> { PoiForm form; if (Objects.equals(VaadinSession.getCurrent().getAttribute("userid"), item.getItemProperty("USER_ID").getValue())) { form = new PoiForm("Edit POI", items, iid, true, true); } else { form = new PoiForm("POI Details", items, iid, false, false); } UI.getCurrent().addWindow(form); }); map.addComponent(marker); } } }
From source file:lifetime.component.timeline.TimelineMenu.java
License:Apache License
@Override protected void addControls() { profileButton = new BackToProfileButton(username, getLanguage()); zoomIn = new LifetimeButtonLink(username, getLanguage(), "Zoon In", FontAwesome.PLUS_CIRCLE); zoomOut = new LifetimeButtonLink(username, getLanguage(), "Zoon Out", FontAwesome.MINUS_CIRCLE); addControl(profileButton);// ww w . j a v a 2 s . co m addControl(zoomIn); addControl(zoomOut); }
From source file:org.gpstouch.account.AccountGridView.java
public HorizontalLayout createTopBar() { TextField filter = new TextField(); filter.setStyleName("filter-textfield"); filter.setInputPrompt("Filter"); ResetButtonForTextField.extend(filter); filter.setImmediate(true);//w w w . j a va 2 s. c o m filter.addTextChangeListener(new FieldEvents.TextChangeListener() { @Override public void textChange(FieldEvents.TextChangeEvent event) { grid.setFilter(event.getText()); } }); bnewAccount = new Button("New Account"); bnewAccount.addStyleName(ValoTheme.BUTTON_PRIMARY); bnewAccount.setIcon(FontAwesome.PLUS_CIRCLE); bnewAccount.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { viewLogic.newAccount(); } }); HorizontalLayout topLayout = new HorizontalLayout(); topLayout.setSpacing(true); topLayout.setWidth("100%"); topLayout.addComponent(filter); topLayout.addComponent(bnewAccount); topLayout.setComponentAlignment(filter, Alignment.MIDDLE_LEFT); topLayout.setExpandRatio(filter, 1); topLayout.setStyleName("top-bar"); return topLayout; }