List of usage examples for com.vaadin.server FontAwesome COMMENT
FontAwesome COMMENT
To view the source code for com.vaadin.server FontAwesome COMMENT.
Click Source Link
From source file:com.esofthead.mycollab.mobile.module.project.ui.ProjectCommentRequestComp.java
License:Open Source License
public ProjectCommentRequestComp(final String typeVal, final String typeIdVal, final Integer extraTypeIdVal) { withMargin(true);/* ww w.j a va 2 s . c o m*/ ELabel hintLbl = new ELabel(FontAwesome.COMMENT.getHtml() + " Add a comment", ContentMode.HTML) .withStyleName(UIConstants.META_INFO); this.addComponent(hintLbl); this.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent layoutClickEvent) { ((NavigationManager) UI.getCurrent().getContent()) .navigateTo(new ProjectCommentInputView(typeVal, typeIdVal, extraTypeIdVal)); } }); }
From source file:com.mycollab.mobile.module.project.ui.ProjectCommentRequestComp.java
License:Open Source License
public ProjectCommentRequestComp(final String typeVal, final String typeIdVal, final Integer extraTypeIdVal) { withMargin(true);/*ww w. ja va2s.c o m*/ ELabel hintLbl = ELabel .html(FontAwesome.COMMENT.getHtml() + " " + UserUIContext.getMessage(GenericI18Enum.ACTION_ADD_COMMENT)) .withStyleName(UIConstants.META_INFO); this.addComponent(hintLbl); this.addLayoutClickListener(layoutClickEvent -> { ((NavigationManager) UI.getCurrent().getContent()) .navigateTo(new ProjectCommentInputView(typeVal, typeIdVal, extraTypeIdVal)); }); }
From source file:com.mycollab.mobile.module.project.view.bug.BugReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { MVerticalLayout toolbarLayout = new MVerticalLayout().withFullWidth().withSpacing(false).withMargin(false); toolbarLayout.setDefaultComponentAlignment(Alignment.TOP_LEFT); if (!SiteConfiguration.isCommunityEdition()) { bugTimeLogComp = new BugTimeLogComp(); toolbarLayout.addComponent(bugTimeLogComp); }//from ww w . j a v a2 s .c o m relatedComments = new CommentNavigationButton(ProjectTypeConstants.BUG, beanItem.getId() + ""); Component section = FormSectionBuilder.build(FontAwesome.COMMENT, relatedComments); toolbarLayout.addComponent(section); return toolbarLayout; }
From source file:com.mycollab.mobile.module.project.view.message.MessageReadViewImpl.java
License:Open Source License
private void displayItem() { mainLayout.removeAllComponents();//from www .j av a2 s .co m MHorizontalLayout messageBlock = new MHorizontalLayout().withSpacing(false).withFullWidth() .withStyleName("message-block"); Image userAvatarImg = UserAvatarControlFactory .createUserAvatarEmbeddedComponent(bean.getPostedUserAvatarId(), 32); userAvatarImg.addStyleName(UIConstants.CIRCLE_BOX); messageBlock.addComponent(userAvatarImg); CssLayout rightCol = new CssLayout(); rightCol.setWidth("100%"); MHorizontalLayout metadataRow = new MHorizontalLayout().withFullWidth(); ELabel userNameLbl = new ELabel(bean.getFullPostedUserName()).withStyleName(UIConstants.META_INFO); userNameLbl.addStyleName(UIConstants.TEXT_ELLIPSIS); CssLayout userNameWrap = new CssLayout(userNameLbl); ELabel messageTimePost = new ELabel().prettyDateTime(bean.getPosteddate()) .withStyleName(UIConstants.META_INFO).withWidthUndefined(); metadataRow.with(userNameWrap, messageTimePost).withAlign(messageTimePost, Alignment.TOP_RIGHT) .expand(userNameWrap); rightCol.addComponent(metadataRow); CssLayout titleRow = new CssLayout(); titleRow.setWidth("100%"); titleRow.setStyleName("title-row"); Label messageTitle = new Label(bean.getTitle()); messageTitle.setStyleName("message-title"); titleRow.addComponent(messageTitle); rightCol.addComponent(titleRow); Label messageContent = new Label(StringUtils.trimHtmlTags(bean.getMessage())); rightCol.addComponent(messageContent); ResourceService attachmentService = AppContextUtil.getSpringBean(ResourceService.class); List<Content> attachments = attachmentService.getContents(AttachmentUtils.getProjectEntityAttachmentPath( MyCollabUI.getAccountId(), bean.getProjectid(), ProjectTypeConstants.MESSAGE, "" + bean.getId())); if (CollectionUtils.isNotEmpty(attachments)) { CssLayout attachmentPanel = new CssLayout(); attachmentPanel.setStyleName("attachment-panel"); attachmentPanel.setWidth("100%"); for (Content attachment : attachments) { attachmentPanel.addComponent(MobileAttachmentUtils.renderAttachmentRow(attachment)); } rightCol.addComponent(attachmentPanel); } messageBlock.with(rightCol).expand(rightCol); mainLayout.addComponent(messageBlock); Label commentTitleLbl = new Label(); Component section = FormSectionBuilder.build(FontAwesome.COMMENT, commentTitleLbl); MessageCommentListDisplay commentDisplay = new MessageCommentListDisplay(ProjectTypeConstants.MESSAGE, bean.getId() + "", bean.getProjectid(), true); int numComments = commentDisplay.getNumComments(); commentTitleLbl.setValue(UserUIContext.getMessage(GenericI18Enum.OPT_COMMENTS_VALUE, numComments)); mainLayout.addComponent(section); mainLayout.addComponent(commentDisplay); this.setToolbar(commentDisplay.getCommentBox()); }
From source file:com.mycollab.mobile.module.project.view.milestone.MilestoneReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { MVerticalLayout toolbarLayout = new MVerticalLayout().withSpacing(false).withMargin(false); toolbarLayout.setDefaultComponentAlignment(Alignment.TOP_LEFT); ticketNavigatorButton = new TicketNavigatorButton(); Component issueSection = FormSectionBuilder.build(FontAwesome.TICKET, ticketNavigatorButton); toolbarLayout.addComponent(issueSection); relatedComments = new CommentNavigationButton(ProjectTypeConstants.MILESTONE, beanItem.getId() + ""); Component commentSection = FormSectionBuilder.build(FontAwesome.COMMENT, relatedComments); toolbarLayout.addComponent(commentSection); return toolbarLayout; }
From source file:com.mycollab.mobile.module.project.view.task.TaskReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { MVerticalLayout toolbarLayout = new MVerticalLayout().withSpacing(false).withMargin(false); toolbarLayout.setDefaultComponentAlignment(Alignment.TOP_LEFT); relatedComments = new CommentNavigationButton(ProjectTypeConstants.TASK, beanItem.getId() + ""); Component section = FormSectionBuilder.build(FontAwesome.COMMENT, relatedComments); toolbarLayout.addComponent(section); if (!SiteConfiguration.isCommunityEdition()) { taskTimeLogComp = new TaskTimeLogComp(); toolbarLayout.addComponent(taskTimeLogComp); }/* w w w . j a v a 2 s. co m*/ return toolbarLayout; }
From source file:helpers.Utils.java
License:Open Source License
public static void Notification(String title, String description, String type) { Notification notify = new Notification(title, description); notify.setPosition(Position.TOP_CENTER); if (type.equals("error")) { notify.setDelayMsec(16000);//from w ww . j a va2s . c o m notify.setIcon(FontAwesome.FROWN_O); notify.setStyleName(ValoTheme.NOTIFICATION_ERROR + " " + ValoTheme.NOTIFICATION_CLOSABLE); } else if (type.equals("success")) { notify.setDelayMsec(8000); notify.setIcon(FontAwesome.SMILE_O); notify.setStyleName(ValoTheme.NOTIFICATION_SUCCESS + " " + ValoTheme.NOTIFICATION_CLOSABLE); } else { notify.setDelayMsec(8000); notify.setIcon(FontAwesome.COMMENT); notify.setStyleName(ValoTheme.NOTIFICATION_TRAY + " " + ValoTheme.NOTIFICATION_CLOSABLE); } notify.show(Page.getCurrent()); }
From source file:org.vaadin.viritin.it.MNotificationExapmle.java
License:Apache License
@Override public Component getTestComponent() { MVerticalLayout layout = new MVerticalLayout(new MLabel("MNotification Examples").withStyleName("h1"), new MHorizontalLayout(new MButton(FontAwesome.COMMENT, "Humanized", new Button.ClickListener() { @Override//from w ww. jav a2s . c o m public void buttonClick(Button.ClickEvent event) { MNotification.humanized("Humanized", "This is a humanized notification!") .withIcon(FontAwesome.COMMENT); } }).withStyleName("primary"), new MButton(FontAwesome.TIMES, "Error", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.error("Error", "This is an error notification!").withIcon(FontAwesome.TIMES); } }).withStyleName("danger"), new MButton(FontAwesome.EXCLAMATION_TRIANGLE, "Warning", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.warning("Warning", "This is a warning notification!") .withIcon(FontAwesome.EXCLAMATION_TRIANGLE); } }), new MButton(FontAwesome.DOWNLOAD, "Tray", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.tray("Tray", "This is a tray notification!") .withIcon(FontAwesome.DOWNLOAD); } }).withStyleName("friendly"), new MButton(FontAwesome.WHEELCHAIR, "Assistive", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { MNotification.assistive("Assistive", "This is an assistive notification!"); } }).withStyleName("quiet"))).withFullWidth(); return layout; }
From source file:ui.button.CommentButton.java
License:Apache License
public CommentButton(Integer userId, String language) { super(Translator.getTranslation("Leave a Comment", language), FontAwesome.COMMENT); this.caption = Translator.getTranslation("Leave a Comment", language); this.userId = userId; this.language = language; addClickListener(this); setDescription(caption);//from w ww .j a va 2s. c o m }
From source file:ui.button.LifetimeEmailButton.java
License:Apache License
public LifetimeEmailButton() { super("", FontAwesome.COMMENT); }