List of usage examples for com.vaadin.server FontAwesome CHECK_CIRCLE_O
FontAwesome CHECK_CIRCLE_O
To view the source code for com.vaadin.server FontAwesome CHECK_CIRCLE_O.
Click Source Link
From source file:com.esofthead.mycollab.module.project.view.task.components.TaskRowRenderer.java
License:Open Source License
private OptionPopupContent createPopupContent() { OptionPopupContent filterBtnLayout = new OptionPopupContent(); Button editButton = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override/*www . j a va 2 s . com*/ public void buttonClick(Button.ClickEvent event) { taskSettingPopupBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new TaskEvent.GotoEdit(TaskRowRenderer.this, task)); } }); editButton.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)); editButton.setIcon(FontAwesome.EDIT); filterBtnLayout.addOption(editButton); filterBtnLayout.addSeparator(); if (!task.isCompleted()) { Button closeBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(Button.ClickEvent event) { task.setStatus(OptionI18nEnum.StatusI18nEnum.Closed.name()); task.setPercentagecomplete(100d); ProjectTaskService projectTaskService = AppContextUtil .getSpringBean(ProjectTaskService.class); projectTaskService.updateSelectiveWithSession(task, AppContext.getUsername()); taskSettingPopupBtn.setPopupVisible(false); closeTask(); EventBusFactory.getInstance() .post(new TaskEvent.HasTaskChange(TaskRowRenderer.this, null)); } }); closeBtn.setIcon(FontAwesome.CHECK_CIRCLE_O); closeBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)); filterBtnLayout.addOption(closeBtn); } else { Button reOpenBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(Button.ClickEvent event) { taskSettingPopupBtn.setPopupVisible(false); task.setStatus(OptionI18nEnum.StatusI18nEnum.Open.name()); task.setPercentagecomplete(0d); ProjectTaskService projectTaskService = AppContextUtil .getSpringBean(ProjectTaskService.class); projectTaskService.updateSelectiveWithSession(task, AppContext.getUsername()); reOpenTask(); EventBusFactory.getInstance() .post(new TaskEvent.HasTaskChange(TaskRowRenderer.this, null)); } }); reOpenBtn.setIcon(FontAwesome.UNLOCK); reOpenBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)); filterBtnLayout.addOption(reOpenBtn); } filterBtnLayout.addSeparator(); Button deleteBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(Button.ClickEvent event) { taskSettingPopupBtn.setPopupVisible(false); ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_TITLE, AppContext.getSiteName()), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_SINGLE_ITEM_MESSAGE), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), new ConfirmDialog.Listener() { private static final long serialVersionUID = 1L; @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { ProjectTaskService projectTaskService = AppContextUtil .getSpringBean(ProjectTaskService.class); projectTaskService.removeWithSession(task, AppContext.getUsername(), AppContext.getAccountId()); deleteTask(); } } }); } }); deleteBtn.setIcon(FontAwesome.TRASH_O); deleteBtn.setEnabled(CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.TASKS)); filterBtnLayout.addDangerOption(deleteBtn); return filterBtnLayout; }
From source file:com.mycollab.module.project.view.task.components.TaskRowRenderer.java
License:Open Source License
private OptionPopupContent createPopupContent() { OptionPopupContent filterBtnLayout = new OptionPopupContent(); if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)) { MButton editButton = new MButton(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT), clickEvent -> { taskSettingPopupBtn.setPopupVisible(false); EventBusFactory.getInstance().post(new TaskEvent.GotoEdit(TaskRowRenderer.this, task)); }).withIcon(FontAwesome.EDIT);/*from ww w.j a va2s . c om*/ filterBtnLayout.addOption(editButton); filterBtnLayout.addSeparator(); } if (!task.isCompleted()) { if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)) { MButton closeBtn = new MButton(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE), clickEvent -> { task.setStatus(OptionI18nEnum.StatusI18nEnum.Closed.name()); task.setPercentagecomplete(100d); ProjectTaskService projectTaskService = AppContextUtil.getSpringBean(ProjectTaskService.class); projectTaskService.updateSelectiveWithSession(task, AppContext.getUsername()); taskSettingPopupBtn.setPopupVisible(false); closeTask(); EventBusFactory.getInstance().post(new TaskEvent.HasTaskChange(TaskRowRenderer.this, null)); }).withIcon(FontAwesome.CHECK_CIRCLE_O); filterBtnLayout.addOption(closeBtn); } } else { if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)) { MButton reOpenBtn = new MButton(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN), clickEvent -> { taskSettingPopupBtn.setPopupVisible(false); task.setStatus(OptionI18nEnum.StatusI18nEnum.Open.name()); task.setPercentagecomplete(0d); ProjectTaskService projectTaskService = AppContextUtil.getSpringBean(ProjectTaskService.class); projectTaskService.updateSelectiveWithSession(task, AppContext.getUsername()); reOpenTask(); EventBusFactory.getInstance().post(new TaskEvent.HasTaskChange(TaskRowRenderer.this, null)); }).withIcon(FontAwesome.UNLOCK); filterBtnLayout.addOption(reOpenBtn); } } filterBtnLayout.addSeparator(); if (CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.TASKS)) { MButton deleteBtn = new MButton(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE), clickEvent -> { taskSettingPopupBtn.setPopupVisible(false); ConfirmDialogExt.show(UI.getCurrent(), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_TITLE, AppContext.getSiteName()), AppContext.getMessage(GenericI18Enum.DIALOG_DELETE_SINGLE_ITEM_MESSAGE), AppContext.getMessage(GenericI18Enum.BUTTON_YES), AppContext.getMessage(GenericI18Enum.BUTTON_NO), confirmDialog -> { if (confirmDialog.isConfirmed()) { ProjectTaskService projectTaskService = AppContextUtil .getSpringBean(ProjectTaskService.class); projectTaskService.removeWithSession(task, AppContext.getUsername(), AppContext.getAccountId()); deleteTask(); } }); }).withIcon(FontAwesome.TRASH_O); filterBtnLayout.addDangerOption(deleteBtn); } return filterBtnLayout; }
From source file:ed.cracken.pos.ui.purchases.PurchaserView.java
public HorizontalLayout createFooter() { total = new Label("<h2><strong>Total:</strong></h2>"); total.setContentMode(ContentMode.HTML); totalValue = new Label("<h2><strong>" + DataFormatHelper.formatNumber(BigDecimal.ZERO) + "</strong></h2>"); totalValue.setContentMode(ContentMode.HTML); quantity = new Label("<h2><strong>Cantidad:</strong></h2>"); quantity.setContentMode(ContentMode.HTML); quantityValue = new Label( "<h2><strong>" + DataFormatHelper.formatNumber(BigDecimal.ZERO) + "</strong></h2>"); quantityValue.setContentMode(ContentMode.HTML); saveTrx = new Button("Guardar", FontAwesome.CHECK_CIRCLE_O); saveTrx.addStyleName(ValoTheme.BUTTON_PRIMARY); saveTrx.setHeight("60px"); saveTrx.addClickListener((Button.ClickEvent event) -> { UI.getCurrent().addWindow(paymentView); });/*from w w w . j av a 2 s . c o m*/ cancelTrx = new Button("Cancelar", FontAwesome.CLOSE); cancelTrx.addStyleName(ValoTheme.BUTTON_DANGER); cancelTrx.setHeight("60px"); HorizontalLayout bottom = new HorizontalLayout(); HorizontalLayout labelsArea = new HorizontalLayout(); HorizontalLayout buttonsArea = new HorizontalLayout(); labelsArea.setSpacing(true); labelsArea.addComponent(total); labelsArea.addComponent(totalValue); labelsArea.addComponent(quantity); labelsArea.addComponent(quantityValue); labelsArea.setComponentAlignment(total, Alignment.MIDDLE_LEFT); labelsArea.setComponentAlignment(totalValue, Alignment.MIDDLE_LEFT); labelsArea.setComponentAlignment(quantity, Alignment.MIDDLE_RIGHT); labelsArea.setComponentAlignment(quantityValue, Alignment.MIDDLE_RIGHT); buttonsArea.setSpacing(true); buttonsArea.addComponent(saveTrx); buttonsArea.addComponent(cancelTrx); bottom.setSpacing(true); bottom.addComponent(buttonsArea); bottom.addComponent(labelsArea); bottom.setComponentAlignment(buttonsArea, Alignment.MIDDLE_LEFT); bottom.setComponentAlignment(labelsArea, Alignment.MIDDLE_RIGHT); bottom.setWidth("100%"); return bottom; }
From source file:org.inakirj.imagerulette.screens.DiceGallerySetupView.java
License:Open Source License
/** * Adds the row.// ww w. j a v a 2 s .c o m */ public void addRow(String urlEntry) { DiceItem itemCreated = new DiceItem(); Button validateButton = new Button(); validateButton.setIcon(FontAwesome.CHECK_CIRCLE_O); validateButton.addClickListener(e -> validateUrl(itemCreated)); itemCreated.setValidateImg(validateButton); Image imgRow = null; String url = null; if (urlEntry != null) { StringTokenizer urlEntryTokenizer = new StringTokenizer(urlEntry, " "); url = urlEntryTokenizer.nextToken(); ExternalResource resource = new ExternalResource(url); imgRow = new Image("", resource); itemCreated.setId(getNextId()); } else { imgRow = new Image("", null); } imgRow.addStyleName("dice-image"); imgRow.addStyleName("dice-align-center"); itemCreated.setImg(imgRow); TextField textRow = new TextField(); textRow.addStyleName("url-style"); if (url != null) { textRow.setValue(url); validateButton.setIcon(FontAwesome.CHECK_CIRCLE); } itemCreated.setUrl(textRow); if (urlEntry != null) { itemCreated.getUrl().setEnabled(false); } itemCreated.setValid(imgRow != null); Button deleteButton = new Button(); deleteButton.setIcon(FontAwesome.TRASH); itemCreated.setDeleteImg(deleteButton); deleteButton.addClickListener(e -> deleteUrl(itemCreated)); newDataSource.addBean(itemCreated); hasReachLimitImages = newDataSource.size() == TOTAL_URL_LIMIT; }