Example usage for com.vaadin.server FontAwesome FILE_PDF_O

List of usage examples for com.vaadin.server FontAwesome FILE_PDF_O

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome FILE_PDF_O.

Prototype

FontAwesome FILE_PDF_O

To view the source code for com.vaadin.server FontAwesome FILE_PDF_O.

Click Source Link

Usage

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_ACCOUNT)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }//from w  ww  .j a  v  a  2 s  .com

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_ACCOUNT)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();
    if (AppContext.canAccess(RolePermissionCollections.CRM_CALL)
            || AppContext.canAccess(RolePermissionCollections.CRM_MEETING)
            || AppContext.canAccess(RolePermissionCollections.CRM_TASK)) {

        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }//from www. ja va2s.c  o  m

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_CAMPAIGN)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }//from w  ww  .j  ava2 s. c  o  m

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_CAMPAIGN)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_CASE)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }/*from w  w  w .  jav  a2 s.  com*/

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_CASE)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_CONTACT)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }//from ww  w. j a v  a2  s . c o  m

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_CONTACT)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_LEAD)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }/*from   www.  j  ava2  s.  c  o m*/

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_LEAD)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

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

License:Open Source License

@Override
protected DefaultMassItemActionHandlersContainer createActionControls() {
    DefaultMassItemActionHandlersContainer container = new DefaultMassItemActionHandlersContainer();

    if (AppContext.canAccess(RolePermissionCollections.CRM_OPPORTUNITY)) {
        container.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }//from  www  . j av  a2  s . co  m

    container.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O, "export",
            "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION, FontAwesome.FILE_EXCEL_O,
            "export", "export.xlsx", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    container.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O, "export",
            "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    if (AppContext.canWrite(RolePermissionCollections.CRM_OPPORTUNITY)) {
        container.addActionItem(MassItemActionHandler.MASS_UPDATE_ACTION, FontAwesome.DATABASE, "update",
                AppContext.getMessage(GenericI18Enum.TOOLTIP_MASS_UPDATE));
    }

    return container;
}

From source file:com.esofthead.mycollab.module.project.view.bug.BugListViewImpl.java

License:Open Source License

private ComponentContainer constructTableActionControls() {
    final MHorizontalLayout layout = new MHorizontalLayout().withWidth("100%");

    final Label lbEmpty = new Label("");
    layout.with(lbEmpty).expand(lbEmpty);

    MHorizontalLayout buttonControls = new MHorizontalLayout();
    layout.addComponent(buttonControls);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override// w  w  w  .  ja v  a 2 s.  c  o  m
        public void buttonClick(ClickEvent event) {
            UI.getCurrent().addWindow(new BugListCustomizeWindow(BugListView.VIEW_DEF_ID, tableItem));

        }
    });
    customizeViewBtn.setIcon(FontAwesome.COG);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.THEME_GRAY_LINK);
    buttonControls.addComponent(customizeViewBtn);

    PopupButton exportButtonControl = new PopupButton();
    exportButtonControl.addStyleName(UIConstants.THEME_GRAY_LINK);
    exportButtonControl.setIcon(FontAwesome.EXTERNAL_LINK);
    exportButtonControl.setDescription(AppContext.getMessage(FileI18nEnum.EXPORT_FILE));

    VerticalLayout popupButtonsControl = new VerticalLayout();
    exportButtonControl.setContent(popupButtonsControl);

    Button exportPdfBtn = new Button(AppContext.getMessage(FileI18nEnum.PDF));

    StreamWrapperFileDownloader fileDownloader = new StreamWrapperFileDownloader(new StreamResourceFactory() {

        @Override
        public StreamResource getStreamResource() {
            String title = "Bugs of Project " + ((CurrentProjectVariables.getProject() != null
                    && CurrentProjectVariables.getProject().getName() != null)
                            ? CurrentProjectVariables.getProject().getName()
                            : "");
            BugSearchCriteria searchCriteria = new BugSearchCriteria();
            searchCriteria.setProjectId(
                    new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProject().getId()));

            return new StreamResource(new SimpleGridExportItemsStreamResource.AllItems<>(title,
                    new RpParameterBuilder(tableItem.getDisplayColumns()), ReportExportType.PDF,
                    ApplicationContextUtil.getSpringBean(BugService.class), searchCriteria, SimpleBug.class),
                    "export.pdf");
        }

    });
    fileDownloader.extend(exportPdfBtn);
    exportPdfBtn.setIcon(FontAwesome.FILE_PDF_O);
    exportPdfBtn.setStyleName("link");
    popupButtonsControl.addComponent(exportPdfBtn);

    Button exportExcelBtn = new Button(AppContext.getMessage(FileI18nEnum.EXCEL));
    StreamWrapperFileDownloader excelDownloader = new StreamWrapperFileDownloader(new StreamResourceFactory() {

        @Override
        public StreamResource getStreamResource() {
            String title = "Bugs of Project " + ((CurrentProjectVariables.getProject() != null
                    && CurrentProjectVariables.getProject().getName() != null)
                            ? CurrentProjectVariables.getProject().getName()
                            : "");
            BugSearchCriteria searchCriteria = new BugSearchCriteria();
            searchCriteria.setProjectId(
                    new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProject().getId()));

            return new StreamResource(new SimpleGridExportItemsStreamResource.AllItems<>(title,
                    new RpParameterBuilder(tableItem.getDisplayColumns()), ReportExportType.EXCEL,
                    ApplicationContextUtil.getSpringBean(BugService.class), searchCriteria, SimpleBug.class),
                    "export.xlsx");
        }
    });
    excelDownloader.extend(exportExcelBtn);
    exportExcelBtn.setIcon(FontAwesome.FILE_EXCEL_O);
    exportExcelBtn.setStyleName("link");
    popupButtonsControl.addComponent(exportExcelBtn);

    Button exportCsvBtn = new Button(AppContext.getMessage(FileI18nEnum.CSV));

    StreamWrapperFileDownloader csvFileDownloader = new StreamWrapperFileDownloader(
            new StreamResourceFactory() {

                @Override
                public StreamResource getStreamResource() {
                    String title = "Bugs of Project " + ((CurrentProjectVariables.getProject() != null
                            && CurrentProjectVariables.getProject().getName() != null)
                                    ? CurrentProjectVariables.getProject().getName()
                                    : "");
                    BugSearchCriteria searchCriteria = new BugSearchCriteria();
                    searchCriteria.setProjectId(new NumberSearchField(SearchField.AND,
                            CurrentProjectVariables.getProject().getId()));

                    return new StreamResource(new SimpleGridExportItemsStreamResource.AllItems<>(title,
                            new RpParameterBuilder(tableItem.getDisplayColumns()), ReportExportType.CSV,
                            ApplicationContextUtil.getSpringBean(BugService.class), searchCriteria,
                            SimpleBug.class), "export.csv");
                }
            });
    csvFileDownloader.extend(exportCsvBtn);

    exportCsvBtn.setIcon(FontAwesome.FILE_TEXT_O);
    exportCsvBtn.setStyleName("link");
    popupButtonsControl.addComponent(exportCsvBtn);

    buttonControls.addComponent(exportButtonControl);
    return layout;
}

From source file:com.esofthead.mycollab.module.project.view.bug.ComponentListViewImpl.java

License:Open Source License

private ComponentContainer constructTableActionControls() {
    final CssLayout layoutWrapper = new CssLayout();
    layoutWrapper.setWidth("100%");

    final HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);//from  ww  w.  j a  va 2 s .com
    layoutWrapper.addStyleName(UIConstants.TABLE_ACTION_CONTROLS);
    layoutWrapper.addComponent(layout);

    this.selectOptionButton = new SelectionOptionButton(this.tableItem);
    layout.addComponent(this.selectOptionButton);

    this.tableActionControls = new DefaultMassItemActionHandlersContainer();
    if (CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.COMPONENTS)) {
        tableActionControls.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }

    tableActionControls.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O,
            "export", "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION,
            FontAwesome.FILE_EXCEL_O, "export", "export.xlsx",
            AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O,
            "export", "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    layout.addComponent(this.tableActionControls);
    layout.addComponent(this.selectedItemsNumberLabel);
    layout.setComponentAlignment(this.selectedItemsNumberLabel, Alignment.MIDDLE_CENTER);
    return layoutWrapper;
}

From source file:com.esofthead.mycollab.module.project.view.bug.VersionListViewImpl.java

License:Open Source License

private ComponentContainer constructTableActionControls() {
    final CssLayout layoutWrapper = new CssLayout();
    layoutWrapper.setWidth("100%");
    final HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);//w  w w  .  ja v a  2 s .c  o  m
    layoutWrapper.addStyleName(UIConstants.TABLE_ACTION_CONTROLS);
    layoutWrapper.addComponent(layout);

    this.selectOptionButton = new SelectionOptionButton(this.tableItem);
    layout.addComponent(this.selectOptionButton);

    tableActionControls = new DefaultMassItemActionHandlersContainer();

    if (CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.VERSIONS)) {
        tableActionControls.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }

    tableActionControls.addActionItem(MassItemActionHandler.MAIL_ACTION, FontAwesome.ENVELOPE_O, "mail",
            AppContext.getMessage(GenericI18Enum.BUTTON_MAIL));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_PDF_ACTION, FontAwesome.FILE_PDF_O,
            "export", "export.pdf", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_PDF));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_EXCEL_ACTION,
            FontAwesome.FILE_EXCEL_O, "export", "export.xlsx",
            AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_EXCEL));

    tableActionControls.addDownloadActionItem(MassItemActionHandler.EXPORT_CSV_ACTION, FontAwesome.FILE_TEXT_O,
            "export", "export.csv", AppContext.getMessage(GenericI18Enum.BUTTON_EXPORT_CSV));

    layout.addComponent(this.tableActionControls);
    layout.addComponent(this.selectedItemsNumberLabel);
    layout.setComponentAlignment(this.selectedItemsNumberLabel, Alignment.MIDDLE_CENTER);
    return layoutWrapper;
}