List of usage examples for com.vaadin.ui HorizontalLayout addComponent
@Override public void addComponent(Component c)
From source file:com.esofthead.mycollab.mobile.module.crm.view.account.AccountReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*from w ww . ja v a2 s . c o m*/ Button relatedContacts = new Button(); relatedContacts.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_CONTACT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT) + "</div>"); relatedContacts.setHtmlContentAllowed(true); relatedContacts.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new AccountEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateContacts))); } }); toolbarLayout.addComponent(relatedContacts); Button relatedOpportunities = new Button(); relatedOpportunities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_OPPORTUNITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_OPPORTUNITY) + "</div>"); relatedOpportunities.setHtmlContentAllowed(true); relatedOpportunities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new AccountEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateOpportunities))); } }); toolbarLayout.addComponent(relatedOpportunities); Button relatedLeads = new Button(); relatedLeads.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_LEAD + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD) + "</div>"); relatedLeads.setHtmlContentAllowed(true); relatedLeads.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new AccountEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateLeads))); } }); toolbarLayout.addComponent(relatedLeads); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new AccountEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new AccountEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivities))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.activity.AssignmentReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*w ww .j a va2 s. c o m*/ Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 8846423206027007038L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new ActivityEvent.GoToRelatedItems(AssignmentReadViewImpl.this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.activity.CallReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*from ww w . ja v a 2 s . c om*/ Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 8846423206027007038L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new ActivityEvent.GoToRelatedItems(CallReadViewImpl.this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.activity.MeetingReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*from ww w . j a va 2 s . co m*/ Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 8846423206027007038L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new ActivityEvent.GoToRelatedItems(MeetingReadViewImpl.this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.campaign.CampaignReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*from www . ja v a2 s .c om*/ Button relatedAccounts = new Button(); relatedAccounts.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACCOUNT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACCOUNT) + "</div>"); relatedAccounts.setHtmlContentAllowed(true); relatedAccounts.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CampaignEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateAccounts))); } }); toolbarLayout.addComponent(relatedAccounts); Button relatedContacts = new Button(); relatedContacts.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_CONTACT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT) + "</div>"); relatedContacts.setHtmlContentAllowed(true); relatedContacts.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CampaignEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateContacts))); } }); toolbarLayout.addComponent(relatedContacts); Button relatedLeads = new Button(); relatedLeads.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_LEAD + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD) + "</div>"); relatedLeads.setHtmlContentAllowed(true); relatedLeads.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CampaignEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateLeads))); } }); toolbarLayout.addComponent(relatedLeads); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CampaignEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new CampaignEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivities))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.cases.CaseReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);//from w w w . j ava 2 s.c om Button relatedContacts = new Button(); relatedContacts.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_CONTACT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT) + "</div>"); relatedContacts.setHtmlContentAllowed(true); relatedContacts.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CaseEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateContacts))); } }); toolbarLayout.addComponent(relatedContacts); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance() .post(new CaseEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new CaseEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivities))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.contact.ContactReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/* w ww . j a v a2s. c o m*/ Button relatedOpportunities = new Button(); relatedOpportunities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_OPPORTUNITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_OPPORTUNITY) + "</div>"); relatedOpportunities.setHtmlContentAllowed(true); relatedOpportunities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new ContactEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateOpportunityList))); } }); toolbarLayout.addComponent(relatedOpportunities); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent evt) { EventBusFactory.getInstance().post( new ContactEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(noteListItems))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent evt) { EventBusFactory.getInstance().post(new ContactEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivityList))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.lead.LeadReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*from ww w. j a v a2 s . c om*/ Button relatedCampaigns = new Button(); relatedCampaigns.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_CAMPAIGN + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_CAMPAIGN) + "</div>"); relatedCampaigns.setHtmlContentAllowed(true); relatedCampaigns.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7027681785871215444L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new LeadEvent.GoToRelatedItems(LeadReadViewImpl.this, new CrmRelatedItemsScreenData(associateCampaigns))); } }); toolbarLayout.addComponent(relatedCampaigns); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance() .post(new LeadEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new LeadEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivities))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.crm.view.opportunity.OpportunityReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { HorizontalLayout toolbarLayout = new HorizontalLayout(); toolbarLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); toolbarLayout.setSpacing(true);/*w ww. j a va 2 s. c om*/ Button relatedContacts = new Button(); relatedContacts.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_CONTACT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT) + "</div>"); relatedContacts.setHtmlContentAllowed(true); relatedContacts.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new OpportunityEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateContacts))); } }); toolbarLayout.addComponent(relatedContacts); Button relatedLeads = new Button(); relatedLeads.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_LEAD + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD) + "</div>"); relatedLeads.setHtmlContentAllowed(true); relatedLeads.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new OpportunityEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateLeads))); } }); toolbarLayout.addComponent(relatedLeads); Button relatedNotes = new Button(); relatedNotes.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_DOCUMENT + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE) + "</div>"); relatedNotes.setHtmlContentAllowed(true); relatedNotes.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post( new OpportunityEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateNotes))); } }); toolbarLayout.addComponent(relatedNotes); Button relatedActivities = new Button(); relatedActivities.setCaption("<span aria-hidden=\"true\" data-icon=\"" + IconConstants.CRM_ACTIVITY + "\"></span><div class=\"screen-reader-text\">" + AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY) + "</div>"); relatedActivities.setHtmlContentAllowed(true); relatedActivities.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 7589415773039335559L; @Override public void buttonClick(ClickEvent arg0) { EventBusFactory.getInstance().post(new OpportunityEvent.GoToRelatedItems(this, new CrmRelatedItemsScreenData(associateActivities))); } }); toolbarLayout.addComponent(relatedActivities); return toolbarLayout; }
From source file:com.esofthead.mycollab.mobile.module.project.ui.ProjectCommentInput.java
License:Open Source License
private Component createAttachmentRow(String fileName) { final HorizontalLayout uploadSucceedLayout = new HorizontalLayout(); uploadSucceedLayout.setWidth("100%"); Label uploadResult = new Label(fileName); uploadResult.setWidth("100%"); uploadSucceedLayout.addComponent(uploadResult); uploadSucceedLayout.setExpandRatio(uploadResult, 1.0f); Button removeAttachment = new Button( "<span aria-hidden=\"true\" data-icon=\"" + IconConstants.DELETE + "\"></span>", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override/*from w w w . j a v a 2 s. c om*/ public void buttonClick(ClickEvent event) { statusWrapper.removeComponent(uploadSucceedLayout); } }); removeAttachment.setHtmlContentAllowed(true); removeAttachment.setStyleName("link"); uploadSucceedLayout.addComponent(removeAttachment); uploadSucceedLayout.setStyleName("upload-succeed-layout"); uploadSucceedLayout.setSpacing(true); return uploadSucceedLayout; }