List of usage examples for com.vaadin.server FontAwesome TIMES
FontAwesome TIMES
To view the source code for com.vaadin.server FontAwesome TIMES.
Click Source Link
From source file:com.dungnv.streetfood.ui.ArticleItemUI.java
private void init() { this.addStyleName("item-interator"); this.setSpacing(true); this.setWidth("100%"); CssLayout horizontal = new CssLayout(); horizontal.setStyleName("padding-5"); horizontal.setWidth("100%"); Responsive.makeResponsive(horizontal); this.addComponent(horizontal); Image imag = new Image(); if (!StringUtils.isNullOrEmpty(item.getImageUrl())) { imag.setSource(new ExternalResource(item.getImageUrl())); }/*w w w . ja va 2 s . co m*/ horizontal.addComponent(imag); VerticalLayout vlInfo = new VerticalLayout(); vlInfo.setStyleName("padding-5"); vlInfo.setWidth("70%"); horizontal.addComponent(vlInfo); lbTitle = new Label(item.getTitle()); lbTitle.addStyleName("lb-title"); vlInfo.addComponent(lbTitle); lbIntroduce = new Label(item.getShortContent()); lbIntroduce.setStyleName("lb-description"); vlInfo.addComponent(lbIntroduce); HorizontalLayout htInfo = new HorizontalLayout(); vlInfo.addComponent(htInfo); lbInfo = new Label(); lbInfo.setCaptionAsHtml(true); htInfo.addComponent(lbInfo); HorizontalLayout htToolBar = new HorizontalLayout(); htToolBar.setStyleName("lb-toolbar"); horizontal.addComponent(htToolBar); btnLink = new Button(); btnLink.setIcon(FontAwesome.LINK); btnLink.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLink.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLink.setWidth("25px"); btnLink.setHeight("25px"); htToolBar.addComponent(btnLink); htToolBar.setComponentAlignment(btnLink, Alignment.BOTTOM_RIGHT); btnEdit = new Button(); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnEdit.setWidth("25px"); btnEdit.setHeight("25px"); htToolBar.addComponent(btnEdit); htToolBar.setComponentAlignment(btnEdit, Alignment.BOTTOM_RIGHT); btnDelete = new Button(); btnDelete.setIcon(FontAwesome.TIMES); btnDelete.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnDelete.setWidth("25px"); btnDelete.setHeight("25px"); htToolBar.addComponent(btnDelete); htToolBar.setComponentAlignment(btnDelete, Alignment.BOTTOM_RIGHT); }
From source file:com.dungnv.streetfood.ui.CategoryItemUI.java
private void init() { this.addStyleName("item-interator"); this.setSpacing(true); this.setWidth("100%"); CssLayout horizontal = new CssLayout(); horizontal.setStyleName("padding-5"); horizontal.setWidth("100%"); Responsive.makeResponsive(horizontal); this.addComponent(horizontal); Image imag = new Image(); if (!StringUtils.isNullOrEmpty(item.getImageUrl())) { imag.setSource(new ExternalResource(item.getImageUrl())); }/*from w w w . j a v a 2 s. c o m*/ horizontal.addComponent(imag); VerticalLayout vlInfo = new VerticalLayout(); vlInfo.setStyleName("padding-5"); vlInfo.setWidth("70%"); horizontal.addComponent(vlInfo); lbTitle = new Label(item.getName()); lbTitle.addStyleName("lb-title"); if ("1".equals(item.getCategoryStatus())) { lbTitle.addStyleName("lb-status-active"); } else { lbTitle.addStyleName("lb-status-inActive"); } vlInfo.addComponent(lbTitle); lbDesc = new Label(item.getDescription()); lbDesc.setStyleName("lb-description"); vlInfo.addComponent(lbDesc); HorizontalLayout htInfo = new HorizontalLayout(); vlInfo.addComponent(htInfo); lbInfo = new Label(); lbInfo.setCaptionAsHtml(true); htInfo.addComponent(lbInfo); HorizontalLayout htToolBar = new HorizontalLayout(); htToolBar.setStyleName("lb-toolbar"); horizontal.addComponent(htToolBar); btnLock = new Button(); if ("1".equals(item.getCategoryStatus())) { btnLock.setIcon(FontAwesome.LOCK); } else { btnLock.setIcon(FontAwesome.UNLOCK); } btnLock.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLock.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLock.setWidth("25px"); btnLock.setHeight("25px"); htToolBar.addComponent(btnLock); htToolBar.setComponentAlignment(btnLock, Alignment.BOTTOM_RIGHT); btnLink = new Button(); btnLink.setIcon(FontAwesome.LINK); btnLink.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLink.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLink.setWidth("25px"); btnLink.setHeight("25px"); htToolBar.addComponent(btnLink); htToolBar.setComponentAlignment(btnLink, Alignment.BOTTOM_RIGHT); btnEdit = new Button(); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnEdit.setWidth("25px"); btnEdit.setHeight("25px"); htToolBar.addComponent(btnEdit); htToolBar.setComponentAlignment(btnEdit, Alignment.BOTTOM_RIGHT); btnDelete = new Button(); btnDelete.setIcon(FontAwesome.TIMES); btnDelete.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnDelete.setWidth("25px"); btnDelete.setHeight("25px"); htToolBar.addComponent(btnDelete); htToolBar.setComponentAlignment(btnDelete, Alignment.BOTTOM_RIGHT); }
From source file:com.dungnv.streetfood.ui.DishItemUI.java
private void init() { this.addStyleName("item-interator"); this.setSpacing(true); this.setWidth("100%"); CssLayout horizontal = new CssLayout(); horizontal.setStyleName("padding-5"); horizontal.setWidth("100%"); Responsive.makeResponsive(horizontal); this.addComponent(horizontal); Image imag = new Image(); if (!StringUtils.isNullOrEmpty(item.getImageUrl())) { imag.setSource(new ExternalResource(item.getImageUrl())); }//from www. j a va 2 s . c o m horizontal.addComponent(imag); VerticalLayout vlInfo = new VerticalLayout(); vlInfo.setStyleName("padding-5"); vlInfo.setWidth("70%"); horizontal.addComponent(vlInfo); lbTitle = new Label(item.getName()); lbTitle.addStyleName("lb-title"); vlInfo.addComponent(lbTitle); lbDesc = new Label(item.getShortDescription()); lbDesc.setStyleName("lb-description"); vlInfo.addComponent(lbDesc); HorizontalLayout htInfo = new HorizontalLayout(); vlInfo.addComponent(htInfo); lbInfo = new Label(); lbInfo.setCaptionAsHtml(true); htInfo.addComponent(lbInfo); HorizontalLayout htToolBar = new HorizontalLayout(); htToolBar.setStyleName("lb-toolbar"); horizontal.addComponent(htToolBar); btnLock = new Button(); if ("1".equals(item.getDishStatus())) { btnLock.setIcon(FontAwesome.LOCK); } else { btnLock.setIcon(FontAwesome.UNLOCK); } btnLock.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLock.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLock.setWidth("25px"); btnLock.setHeight("25px"); htToolBar.addComponent(btnLock); htToolBar.setComponentAlignment(btnLock, Alignment.BOTTOM_RIGHT); btnLink = new Button(); btnLink.setIcon(FontAwesome.LINK); btnLink.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLink.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLink.setWidth("25px"); btnLink.setHeight("25px"); htToolBar.addComponent(btnLink); htToolBar.setComponentAlignment(btnLink, Alignment.BOTTOM_RIGHT); btnEdit = new Button(); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnEdit.setWidth("25px"); btnEdit.setHeight("25px"); htToolBar.addComponent(btnEdit); htToolBar.setComponentAlignment(btnEdit, Alignment.BOTTOM_RIGHT); btnDelete = new Button(); btnDelete.setIcon(FontAwesome.TIMES); btnDelete.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnDelete.setWidth("25px"); btnDelete.setHeight("25px"); htToolBar.addComponent(btnDelete); htToolBar.setComponentAlignment(btnDelete, Alignment.BOTTOM_RIGHT); }
From source file:com.dungnv.streetfood.ui.RestaurantItemUI.java
private void init() { this.addStyleName("item-interator"); this.setSpacing(true); this.setWidth("100%"); CssLayout horizontal = new CssLayout(); horizontal.setStyleName("padding-5"); horizontal.setWidth("100%"); Responsive.makeResponsive(horizontal); this.addComponent(horizontal); Image imag = new Image(); if (!StringUtils.isNullOrEmpty(item.getImageUrl())) { imag.setSource(new ExternalResource(item.getImageUrl())); }/* w w w . jav a2 s . com*/ horizontal.addComponent(imag); VerticalLayout vlInfo = new VerticalLayout(); vlInfo.setStyleName("padding-5"); vlInfo.setWidth("70%"); horizontal.addComponent(vlInfo); lbTitle = new Label(item.getName()); lbTitle.addStyleName("lb-title"); vlInfo.addComponent(lbTitle); lbIntroduce = new Label(item.getAddress()); lbIntroduce.setStyleName("lb-description"); vlInfo.addComponent(lbIntroduce); HorizontalLayout htInfo = new HorizontalLayout(); vlInfo.addComponent(htInfo); lbInfo = new Label(); lbInfo.setCaptionAsHtml(true); htInfo.addComponent(lbInfo); HorizontalLayout htToolBar = new HorizontalLayout(); htToolBar.setStyleName("lb-toolbar"); horizontal.addComponent(htToolBar); btnLock = new Button(); if ("1".equals(item.getRestaurantStatus())) { btnLock.setIcon(FontAwesome.LOCK); } else { btnLock.setIcon(FontAwesome.UNLOCK); } btnLock.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLock.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLock.setWidth("25px"); btnLock.setHeight("25px"); htToolBar.addComponent(btnLock); htToolBar.setComponentAlignment(btnLock, Alignment.BOTTOM_RIGHT); btnLink = new Button(); btnLink.setIcon(FontAwesome.LINK); btnLink.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnLink.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnLink.setWidth("25px"); btnLink.setHeight("25px"); htToolBar.addComponent(btnLink); htToolBar.setComponentAlignment(btnLink, Alignment.BOTTOM_RIGHT); btnEdit = new Button(); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnEdit.setWidth("25px"); btnEdit.setHeight("25px"); htToolBar.addComponent(btnEdit); htToolBar.setComponentAlignment(btnEdit, Alignment.BOTTOM_RIGHT); btnDelete = new Button(); btnDelete.setIcon(FontAwesome.TIMES); btnDelete.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnDelete.setWidth("25px"); btnDelete.setHeight("25px"); htToolBar.addComponent(btnDelete); htToolBar.setComponentAlignment(btnDelete, Alignment.BOTTOM_RIGHT); }
From source file:com.dungnv.streetfood.ui.SlideShowItemUI.java
private void init() { this.addStyleName("item-interator"); this.setSpacing(true); this.setWidth("100%"); CssLayout horizontal = new CssLayout(); horizontal.setStyleName("padding-5"); horizontal.setWidth("100%"); Responsive.makeResponsive(horizontal); this.addComponent(horizontal); Image imag = new Image(); if (!StringUtils.isNullOrEmpty(item.getImageUrl())) { imag.setSource(new ExternalResource(item.getImageUrl())); }/*w w w . j ava2 s . c o m*/ horizontal.addComponent(imag); VerticalLayout vlInfo = new VerticalLayout(); vlInfo.setStyleName("padding-5"); vlInfo.setWidth("70%"); horizontal.addComponent(vlInfo); lbTitle = new Label(item.getName()); lbTitle.addStyleName("lb-title"); vlInfo.addComponent(lbTitle); lbIntroduce = new Label(item.getDescription()); lbIntroduce.setStyleName("lb-description"); vlInfo.addComponent(lbIntroduce); HorizontalLayout htInfo = new HorizontalLayout(); vlInfo.addComponent(htInfo); lbInfo = new Label(); lbInfo.setCaptionAsHtml(true); htInfo.addComponent(lbInfo); HorizontalLayout htToolBar = new HorizontalLayout(); htToolBar.setStyleName("lb-toolbar"); horizontal.addComponent(htToolBar); btnEdit = new Button(); btnEdit.setIcon(FontAwesome.EDIT); btnEdit.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnEdit.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnEdit.setWidth("25px"); btnEdit.setHeight("25px"); htToolBar.addComponent(btnEdit); htToolBar.setComponentAlignment(btnEdit, Alignment.BOTTOM_RIGHT); btnDelete = new Button(); btnDelete.setIcon(FontAwesome.TIMES); btnDelete.addStyleName(ValoTheme.BUTTON_ICON_ONLY); btnDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); btnDelete.setWidth("25px"); btnDelete.setHeight("25px"); htToolBar.addComponent(btnDelete); htToolBar.setComponentAlignment(btnDelete, Alignment.BOTTOM_RIGHT); }
From source file:com.esofthead.mycollab.module.crm.view.opportunity.ContactRoleEditViewImpl.java
License:Open Source License
private ComponentContainer createButtonControls() { HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true);//w w w.j a v a 2 s . c o m layout.setMargin(true); HorizontalLayout buttonWrapper = new HorizontalLayout(); buttonWrapper.setWidthUndefined(); buttonWrapper.setSpacing(true); Button updateBtn = new Button("Update", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { updateContactRoles(); } }); updateBtn.setIcon(FontAwesome.SAVE); updateBtn.setStyleName(UIConstants.THEME_GREEN_LINK); buttonWrapper.addComponent(updateBtn); Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { ViewState viewState = HistoryViewManager.back(); if (viewState instanceof NullViewState) { EventBusFactory.getInstance().post(new ContactEvent.GotoList(this, null)); } } }); cancelBtn.setIcon(FontAwesome.TIMES); cancelBtn.setStyleName(UIConstants.THEME_GRAY_LINK); buttonWrapper.addComponent(cancelBtn); layout.addComponent(buttonWrapper); layout.setComponentAlignment(buttonWrapper, Alignment.MIDDLE_CENTER); return layout; }
From source file:com.esofthead.mycollab.module.project.ui.components.TimeLogEditWindow.java
License:Open Source License
private void initUI() { this.setWidth("900px"); headerPanel = new MHorizontalLayout().withWidth("100%"); content.addComponent(headerPanel);/*w ww .j a v a 2 s .c o m*/ constructSpentTimeEntryPanel(); constructRemainTimeEntryPanel(); this.tableItem = new DefaultPagedBeanTable<>( ApplicationContextUtil.getSpringBean(ItemTimeLoggingService.class), SimpleItemTimeLogging.class, Arrays.asList(TimeTableFieldDef.logUser, TimeTableFieldDef.logForDate, TimeTableFieldDef.logValue, TimeTableFieldDef.billable, new TableViewField(null, "id", UIConstants.TABLE_CONTROL_WIDTH))); this.tableItem.addGeneratedColumn("logUserFullName", new Table.ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging timeLoggingItem = TimeLogEditWindow.this.tableItem .getBeanByIndex(itemId); return new ProjectUserLink(timeLoggingItem.getLoguser(), timeLoggingItem.getLogUserAvatarId(), timeLoggingItem.getLogUserFullName()); } }); this.tableItem.addGeneratedColumn("logforday", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging monitorItem = TimeLogEditWindow.this.tableItem.getBeanByIndex(itemId); final Label l = new Label(); l.setValue(AppContext.formatDate(monitorItem.getLogforday())); return l; } }); this.tableItem.addGeneratedColumn("logvalue", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging itemTimeLogging = TimeLogEditWindow.this.tableItem .getBeanByIndex(itemId); final Label l = new Label(); l.setValue(itemTimeLogging.getLogvalue() + ""); return l; } }); this.tableItem.addGeneratedColumn("isbillable", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public Object generateCell(Table source, Object itemId, Object columnId) { final SimpleItemTimeLogging monitorItem = tableItem.getBeanByIndex(itemId); FontIconLabel icon; if (monitorItem.getIsbillable()) { icon = new FontIconLabel(FontAwesome.CHECK); } else { icon = new FontIconLabel(FontAwesome.TIMES); } icon.setStyleName(UIConstants.BUTTON_ICON_ONLY); return icon; } }); this.tableItem.addGeneratedColumn("id", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging itemTimeLogging = TimeLogEditWindow.this.tableItem .getBeanByIndex(itemId); final Button deleteBtn = new Button(null, new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { TimeLogEditWindow.this.itemTimeLoggingService.removeWithSession(itemTimeLogging.getId(), AppContext.getUsername(), AppContext.getAccountId()); TimeLogEditWindow.this.loadTimeValue(); } }); deleteBtn.setIcon(FontAwesome.TRASH_O); deleteBtn.addStyleName(UIConstants.BUTTON_ICON_ONLY); itemTimeLogging.setExtraData(deleteBtn); deleteBtn.setEnabled(CurrentProjectVariables.isAdmin() || AppContext.getUsername().equals(itemTimeLogging.getLoguser())); return deleteBtn; } }); this.tableItem.setWidth("100%"); content.addComponent(tableItem); }
From source file:com.esofthead.mycollab.module.project.view.settings.component.InviteUserTokenField.java
License:Open Source License
private Component generateToken(final String email) { final Button btn = new Button(email, FontAwesome.TIMES); btn.addClickListener(new Button.ClickListener() { @Override//from w w w . ja va2s .co m public void buttonClick(Button.ClickEvent event) { InviteUserTokenField.this.removeComponent(btn); inviteEmails.remove(email); } }); btn.addStyleName("token-field"); return btn; }
From source file:com.esofthead.mycollab.module.project.view.settings.component.InviteUserTokenField.java
License:Open Source License
private Component generateToken(final SimpleUser user) { final Button btn = new Button("", FontAwesome.TIMES); btn.setCaptionAsHtml(true);//from ww w . ja v a 2 s . co m btn.setCaption((new Img("", StorageFactory.getInstance().getAvatarPath(user.getAvatarid(), 16))).write() + " " + user.getDisplayName()); btn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { InviteUserTokenField.this.removeComponent(btn); inviteEmails.remove(user.getEmail()); } }); btn.setStyleName("token-field"); return btn; }
From source file:com.esofthead.mycollab.module.project.view.time.TimeTrackingTableDisplay.java
License:Open Source License
public TimeTrackingTableDisplay(List<TableViewField> displayColumns) { super(ApplicationContextUtil.getSpringBean(ItemTimeLoggingService.class), SimpleItemTimeLogging.class, displayColumns);/*from www .j ava2s . co m*/ this.addGeneratedColumn("logUserFullName", new Table.ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging timeItem = TimeTrackingTableDisplay.this.getBeanByIndex(itemId); return new ProjectUserLink(timeItem.getLoguser(), timeItem.getLogUserAvatarId(), timeItem.getLogUserFullName()); } }); this.addGeneratedColumn("summary", new Table.ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { SimpleItemTimeLogging itemLogging = TimeTrackingTableDisplay.this.getBeanByIndex(itemId); try { VerticalLayout summaryWrapper = new VerticalLayout(); String type = itemLogging.getType(); if (type == null) { return new Label(itemLogging.getNote(), ContentMode.HTML); } else { Label timeTrackingLink = new Label(buildItemValue(itemLogging), ContentMode.HTML); timeTrackingLink.addStyleName("link"); timeTrackingLink.addStyleName(UIConstants.WORD_WRAP); timeTrackingLink.setWidth("100%"); if (ProjectTypeConstants.BUG.equals(type)) { if (BugStatus.Verified.name().equals(itemLogging.getStatus())) { timeTrackingLink.addStyleName(UIConstants.LINK_COMPLETED); } else if (itemLogging.getDueDate() != null && (itemLogging.getDueDate().before(DateTimeUtils.getCurrentDateWithoutMS()))) { timeTrackingLink.addStyleName(UIConstants.LINK_OVERDUE); } } else if (type.equals(ProjectTypeConstants.TASK)) { if (itemLogging.getPercentageComplete() != null && 100d == itemLogging.getPercentageComplete()) { timeTrackingLink.addStyleName(UIConstants.LINK_COMPLETED); } else { if (OptionI18nEnum.StatusI18nEnum.Pending.name().equals(itemLogging.getStatus())) { timeTrackingLink.addStyleName(UIConstants.LINK_PENDING); } else if (itemLogging.getDueDate() != null && (itemLogging.getDueDate() .before(DateTimeUtils.getCurrentDateWithoutMS()))) { timeTrackingLink.addStyleName(UIConstants.LINK_OVERDUE); } } } else { if (OptionI18nEnum.StatusI18nEnum.Closed.name().equals(itemLogging.getStatus())) { timeTrackingLink.addStyleName(UIConstants.LINK_COMPLETED); } else if (itemLogging.getDueDate() != null && (itemLogging.getDueDate().before(DateTimeUtils.getCurrentDateWithoutMS()))) { timeTrackingLink.addStyleName(UIConstants.LINK_OVERDUE); } } summaryWrapper.addComponent(timeTrackingLink); if (StringUtils.isNotBlank(itemLogging.getNote())) { summaryWrapper.addComponent(new Label(itemLogging.getNote(), ContentMode.HTML)); } return summaryWrapper; } } catch (Exception e) { LOG.error("Error: " + BeanUtility.printBeanObj(itemLogging), e); return new Label(""); } } } ); this. addGeneratedColumn("projectName", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public Object generateCell(Table source, Object itemId, Object columnId) { final SimpleItemTimeLogging itemLogging = TimeTrackingTableDisplay.this .getBeanByIndex(itemId); LabelLink b = new LabelLink(itemLogging.getProjectName(), ProjectLinkBuilder.generateProjectFullLink(itemLogging.getProjectid())); b.setIconLink(ProjectAssetsManager.getAsset(ProjectTypeConstants.PROJECT)); return b; } } ); this. addGeneratedColumn("isbillable", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public Object generateCell(Table source, Object itemId, Object columnId) { final SimpleItemTimeLogging timeLogging = TimeTrackingTableDisplay.this .getBeanByIndex(itemId); FontIconLabel icon; if (timeLogging.getIsbillable()) { icon = new FontIconLabel(FontAwesome.CHECK); } else { icon = new FontIconLabel(FontAwesome.TIMES); } return icon; } } ); this. addGeneratedColumn("logforday", new ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public com.vaadin.ui.Component generateCell(final Table source, final Object itemId, final Object columnId) { final SimpleItemTimeLogging timeLogging = TimeTrackingTableDisplay.this .getBeanByIndex(itemId); final Label l = new Label(); l.setValue(AppContext.formatDate(timeLogging.getLogforday())); return l; } } ); this. addGeneratedColumn("id", new Table.ColumnGenerator() { private static final long serialVersionUID = 1L; @Override public Object generateCell(Table source, Object itemId, Object columnId) { final SimpleItemTimeLogging itemLogging = TimeTrackingTableDisplay.this .getBeanByIndex(itemId); MHorizontalLayout layout = new MHorizontalLayout(); Button editBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { fireTableEvent( new TableClickEvent(TimeTrackingTableDisplay.this, itemLogging, "edit")); } }); editBtn.addStyleName(UIConstants.BUTTON_ICON_ONLY); editBtn.setIcon(FontAwesome.EDIT); Button deleteBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { fireTableEvent( new TableClickEvent(TimeTrackingTableDisplay.this, itemLogging, "delete")); } }); deleteBtn.setIcon(FontAwesome.TRASH_O); deleteBtn.addStyleName(UIConstants.BUTTON_ICON_ONLY); layout.with(editBtn, deleteBtn); return layout; } } ); this. setWidth("100%"); }