List of usage examples for com.vaadin.server FontAwesome LONG_ARROW_RIGHT
FontAwesome LONG_ARROW_RIGHT
To view the source code for com.vaadin.server FontAwesome LONG_ARROW_RIGHT.
Click Source Link
From source file:com.esofthead.mycollab.module.crm.ui.components.CrmActivityComponent.java
License:Open Source License
private Component buildAuditBlock(SimpleAuditLog auditLog) { List<AuditChangeItem> changeItems = auditLog.getChangeItems(); if (CollectionUtils.isNotEmpty(changeItems)) { final MHorizontalLayout layout = new MHorizontalLayout() .withMargin(new MarginInfo(true, false, true, false)).withFullWidth().withStyleName("message"); ProjectMemberBlock memberBlock = new ProjectMemberBlock(auditLog.getPosteduser(), auditLog.getPostedUserAvatarId(), auditLog.getPostedUserFullName()); layout.addComponent(memberBlock); MVerticalLayout rowLayout = new MVerticalLayout().withFullWidth().withStyleName("message-container"); MHorizontalLayout messageHeader = new MHorizontalLayout().withFullWidth(); messageHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); ELabel timePostLbl = new ELabel(AppContext.getMessage(GenericI18Enum.EXT_MODIFIED_ITEM, auditLog.getPostedUserFullName(), AppContext.formatPrettyTime(auditLog.getPosteddate())), ContentMode.HTML).withDescription(AppContext.formatDateTime(auditLog.getPosteddate())); timePostLbl.setStyleName(UIConstants.META_INFO); messageHeader.with(timePostLbl).expand(timePostLbl); rowLayout.addComponent(messageHeader); for (int i = 0; i < changeItems.size(); i++) { AuditChangeItem item = changeItems.get(i); String fieldName = item.getField(); DefaultFieldDisplayHandler fieldDisplayHandler = groupFormatter.getFieldDisplayHandler(fieldName); if (fieldDisplayHandler != null) { Span fieldBlock = new Span() .appendText(AppContext.getMessage(fieldDisplayHandler.getDisplayName())) .setCSSClass(UIConstants.BUTTON_BLOCK); Div historyDiv = new Div().appendChild(fieldBlock) .appendText(fieldDisplayHandler.getFormat().toString(item.getOldvalue())) .appendText(" " + FontAwesome.LONG_ARROW_RIGHT.getHtml() + " ") .appendText(fieldDisplayHandler.getFormat().toString(item.getNewvalue())); rowLayout.addComponent(new Label(historyDiv.write(), ContentMode.HTML)); }/* w w w . java2s . c o m*/ } layout.with(rowLayout).expand(rowLayout); return layout; } else { return null; } }
From source file:com.mycollab.module.crm.ui.components.CrmActivityComponent.java
License:Open Source License
private Component buildAuditBlock(SimpleAuditLog auditLog) { List<AuditChangeItem> changeItems = auditLog.getChangeItems(); if (CollectionUtils.isNotEmpty(changeItems)) { final MHorizontalLayout layout = new MHorizontalLayout() .withMargin(new MarginInfo(true, false, true, false)).withFullWidth(); ProjectMemberBlock memberBlock = new ProjectMemberBlock(auditLog.getPosteduser(), auditLog.getPostedUserAvatarId(), auditLog.getPostedUserFullName()); layout.addComponent(memberBlock); MVerticalLayout rowLayout = new MVerticalLayout().withFullWidth() .withStyleName(WebThemes.MESSAGE_CONTAINER); MHorizontalLayout messageHeader = new MHorizontalLayout().withFullWidth(); messageHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); ELabel timePostLbl = new ELabel(UserUIContext.getMessage(GenericI18Enum.EXT_MODIFIED_ITEM, auditLog.getPostedUserFullName(), UserUIContext.formatPrettyTime(auditLog.getPosteddate())), ContentMode.HTML).withDescription(UserUIContext.formatDateTime(auditLog.getPosteddate())); timePostLbl.setStyleName(UIConstants.META_INFO); messageHeader.with(timePostLbl).expand(timePostLbl); rowLayout.addComponent(messageHeader); for (AuditChangeItem item : changeItems) { String fieldName = item.getField(); DefaultFieldDisplayHandler fieldDisplayHandler = groupFormatter.getFieldDisplayHandler(fieldName); if (fieldDisplayHandler != null) { Span fieldBlock = new Span() .appendText(UserUIContext.getMessage(fieldDisplayHandler.getDisplayName())) .setCSSClass(UIConstants.BLOCK); Div historyDiv = new Div().appendChild(fieldBlock) .appendText(fieldDisplayHandler.getFormat().toString(item.getOldvalue())) .appendText(" " + FontAwesome.LONG_ARROW_RIGHT.getHtml() + " ") .appendText(fieldDisplayHandler.getFormat().toString(item.getNewvalue())); rowLayout.addComponent(new Label(historyDiv.write(), ContentMode.HTML)); }//from ww w. j a v a 2 s . c o m } layout.with(rowLayout).expand(rowLayout); return layout; } else { return null; } }
From source file:com.mycollab.module.project.ui.components.ProjectActivityComponent.java
License:Open Source License
private Component buildAuditBlock(SimpleAuditLog auditLog) { List<AuditChangeItem> changeItems = auditLog.getChangeItems(); if (CollectionUtils.isNotEmpty(changeItems)) { final MHorizontalLayout layout = new MHorizontalLayout() .withMargin(new MarginInfo(true, false, true, false)).withFullWidth(); ProjectMemberBlock memberBlock = new ProjectMemberBlock(auditLog.getPosteduser(), auditLog.getPostedUserAvatarId(), auditLog.getPostedUserFullName()); layout.addComponent(memberBlock); MVerticalLayout rowLayout = new MVerticalLayout().withFullWidth() .withStyleName(WebThemes.MESSAGE_CONTAINER); MHorizontalLayout messageHeader = new MHorizontalLayout().withFullWidth(); messageHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); ELabel timePostLbl = ELabel.html(UserUIContext.getMessage(GenericI18Enum.EXT_MODIFIED_ITEM, auditLog.getPostedUserFullName(), UserUIContext.formatPrettyTime(auditLog.getPosteddate()))) .withDescription(UserUIContext.formatDateTime(auditLog.getPosteddate())); timePostLbl.setStyleName(UIConstants.META_INFO); messageHeader.with(timePostLbl).expand(timePostLbl); rowLayout.addComponent(messageHeader); for (AuditChangeItem item : changeItems) { String fieldName = item.getField(); DefaultFieldDisplayHandler fieldDisplayHandler = groupFormatter.getFieldDisplayHandler(fieldName); if (fieldDisplayHandler != null) { Span fieldBlock = new Span() .appendText(UserUIContext.getMessage(fieldDisplayHandler.getDisplayName())) .setCSSClass(UIConstants.BLOCK); Div historyDiv = new Div().appendChild(fieldBlock) .appendText(fieldDisplayHandler.getFormat().toString(item.getOldvalue())) .appendText(" " + FontAwesome.LONG_ARROW_RIGHT.getHtml() + " ") .appendText(fieldDisplayHandler.getFormat().toString(item.getNewvalue())); rowLayout.addComponent(new Label(historyDiv.write(), ContentMode.HTML)); }/*from w w w. j av a 2 s .c o m*/ } layout.with(rowLayout).expand(rowLayout); return layout; } else { return null; } }