Example usage for com.vaadin.ui CssLayout addComponentAsFirst

List of usage examples for com.vaadin.ui CssLayout addComponentAsFirst

Introduction

In this page you can find the example usage for com.vaadin.ui CssLayout addComponentAsFirst.

Prototype

public void addComponentAsFirst(Component c) 

Source Link

Document

Adds a component into this container.

Usage

From source file:com.esofthead.mycollab.module.crm.view.account.AccountReadViewImpl.java

License:Open Source License

@Override
protected final void initRelatedComponents() {
    associateContactList = new AccountContactListComp();
    associateActivityList = new ActivityRelatedItemListComp(true);
    associateOpportunityList = new AccountOpportunityListComp();
    associateLeadList = new AccountLeadListComp();
    associateCaseList = new AccountCaseListComp();
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    compFollowers = new CrmFollowersComp<>(CrmTypeConstants.ACCOUNT, RolePermissionCollections.CRM_ACCOUNT);
    basicInfo.addComponent(compFollowers);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateContactList, CrmTypeConstants.CONTACT,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT));
    previewItemContainer.addTab(associateLeadList, CrmTypeConstants.LEAD,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD));
    previewItemContainer.addTab(associateOpportunityList, CrmTypeConstants.OPPORTUNITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_OPPORTUNITY));
    previewItemContainer.addTab(associateCaseList, CrmTypeConstants.CASE,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CASE));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));

    previewItemContainer.selectTab(CrmTypeConstants.DETAIL);
}

From source file:com.esofthead.mycollab.module.crm.view.activity.AssignmentReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    followersComp = new CrmFollowersComp<>(CrmTypeConstants.TASK, RolePermissionCollections.CRM_TASK);
    basicInfo.addComponent(followersComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.selectTab(CrmTypeConstants.DETAIL);
}

From source file:com.esofthead.mycollab.module.crm.view.activity.CallReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    this.noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    followersComp = new CrmFollowersComp<>(CrmTypeConstants.CALL, RolePermissionCollections.CRM_CALL);
    basicInfo.addComponent(followersComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.selectTab(CrmTypeConstants.DETAIL);
}

From source file:com.esofthead.mycollab.module.crm.view.activity.MeetingReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    followersComp = new CrmFollowersComp<>(CrmTypeConstants.MEETING, RolePermissionCollections.CRM_MEETING);
    basicInfo.addComponent(followersComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.selectTab(CrmTypeConstants.DETAIL);
}

From source file:com.esofthead.mycollab.module.crm.view.campaign.CampaignReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    associateAccountList = new CampaignAccountListComp();
    associateContactList = new CampaignContactListComp();
    associateLeadList = new CampaignLeadListComp();
    associateActivityList = new ActivityRelatedItemListComp(true);
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    compFollowers = new CrmFollowersComp<>(CrmTypeConstants.CAMPAIGN, RolePermissionCollections.CRM_CAMPAIGN);
    basicInfo.addComponent(compFollowers);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateAccountList, CrmTypeConstants.ACCOUNT,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACCOUNT));
    previewItemContainer.addTab(associateContactList, CrmTypeConstants.CONTACT,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT));
    previewItemContainer.addTab(associateLeadList, CrmTypeConstants.LEAD,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));
}

From source file:com.esofthead.mycollab.module.crm.view.cases.CaseReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    associateContactList = new CaseContactListComp();
    associateActivityList = new ActivityRelatedItemListComp(true);
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    followersComp = new CrmFollowersComp<>(CrmTypeConstants.CASE, RolePermissionCollections.CRM_CASE);
    basicInfo.addComponent(followersComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateContactList, CrmTypeConstants.CONTACT,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));
}

From source file:com.esofthead.mycollab.module.crm.view.contact.ContactReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    this.associateOpportunityList = new ContactOpportunityListComp();
    this.associateActivityList = new ActivityRelatedItemListComp(true);
    this.noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    compFollowers = new CrmFollowersComp<>(CrmTypeConstants.CONTACT, RolePermissionCollections.CRM_CONTACT);
    basicInfo.addComponent(compFollowers);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateOpportunityList, CrmTypeConstants.OPPORTUNITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_OPPORTUNITY));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));
}

From source file:com.esofthead.mycollab.module.crm.view.lead.LeadConvertReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    associateCampaignList = new LeadCampaignListComp();

    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));
    noteListItems.setEnableCreateButton(false);

    associateActivityList = new ActivityRelatedItemListComp(false);

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL, "About");
    previewItemContainer.addTab(associateCampaignList, CrmTypeConstants.CAMPAIGN, "Campaigns");
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY, "Activities");
}

From source file:com.esofthead.mycollab.module.crm.view.lead.LeadReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    associateCampaignList = new LeadCampaignListComp();
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));
    associateActivityList = new ActivityRelatedItemListComp(true);

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    compFollowers = new CrmFollowersComp<>(CrmTypeConstants.LEAD, RolePermissionCollections.CRM_LEAD);
    basicInfo.addComponent(compFollowers);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateCampaignList, CrmTypeConstants.CAMPAIGN,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CAMPAIGN));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));
}

From source file:com.esofthead.mycollab.module.crm.view.opportunity.OpportunityReadViewImpl.java

License:Open Source License

@Override
protected void initRelatedComponents() {
    associateContactList = new OpportunityContactListComp();
    associateLeadList = new OpportunityLeadListComp();
    associateActivityList = new ActivityRelatedItemListComp(true);
    noteListItems = new NoteListItems(AppContext.getMessage(CrmCommonI18nEnum.TAB_NOTE));

    CssLayout navigatorWrapper = previewItemContainer.getNavigatorWrapper();
    MVerticalLayout basicInfo = new MVerticalLayout().withWidth("100%").withStyleName("basic-info");

    dateInfoComp = new DateInfoComp();
    basicInfo.addComponent(dateInfoComp);

    peopleInfoComp = new PeopleInfoComp();
    basicInfo.addComponent(peopleInfoComp);

    followersComp = new CrmFollowersComp<>(CrmTypeConstants.OPPORTUNITY,
            RolePermissionCollections.CRM_OPPORTUNITY);
    basicInfo.addComponent(followersComp);

    navigatorWrapper.addComponentAsFirst(basicInfo);

    previewItemContainer.addTab(previewContent, CrmTypeConstants.DETAIL,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ABOUT));
    previewItemContainer.addTab(associateContactList, CrmTypeConstants.CONTACT,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_CONTACT));
    previewItemContainer.addTab(associateLeadList, CrmTypeConstants.LEAD,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_LEAD));
    previewItemContainer.addTab(associateActivityList, CrmTypeConstants.ACTIVITY,
            AppContext.getMessage(CrmCommonI18nEnum.TAB_ACTIVITY));
}