Example usage for com.vaadin.server FontAwesome FILE_TEXT_O

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

Introduction

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

Prototype

FontAwesome FILE_TEXT_O

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.module.project.view.settings.ProjectRoleListViewImpl.java

License:Open Source License

private ComponentContainer constructTableActionControls() {
    final CssLayout layoutWrapper = new CssLayout();
    layoutWrapper.setWidth("100%");
    final MHorizontalLayout layout = new MHorizontalLayout();
    layoutWrapper.addStyleName(UIConstants.TABLE_ACTION_CONTROLS);
    layoutWrapper.addComponent(layout);//from   w w w  .  j a v  a2s. co m

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

    final Button deleteBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    deleteBtn.setEnabled(CurrentProjectVariables.canAccess(ProjectRolePermissionCollections.ROLES));

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

    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.user.accountsettings.team.view.RoleListViewImpl.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.j  a 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);

    final Button deleteBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    deleteBtn.setEnabled(AppContext.canAccess(RolePermissionCollections.ACCOUNT_ROLE));

    this.tableActionControls = new DefaultMassItemActionHandlersContainer();
    if (AppContext.canAccess(RolePermissionCollections.ACCOUNT_ROLE)) {
        tableActionControls.addActionItem(MassItemActionHandler.DELETE_ACTION, FontAwesome.TRASH_O, "delete",
                AppContext.getMessage(GenericI18Enum.BUTTON_DELETE));
    }
    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.vaadin.resources.file.FileAssetsUtil.java

License:Open Source License

public static FontAwesome getFileIconResource(String fileName) {
    String mimeType = MimeTypesUtil.detectMimeType(fileName);
    if (MimeTypesUtil.isImage(mimeType)) {
        return FontAwesome.FILE_IMAGE_O;
    } else if (MimeTypesUtil.isAudio(mimeType)) {
        return FontAwesome.FILE_AUDIO_O;
    } else if (MimeTypesUtil.isVideo(mimeType)) {
        return FontAwesome.FILE_VIDEO_O;
    } else if (MimeTypesUtil.isText(mimeType)) {
        return FontAwesome.FILE_TEXT_O;
    }//from   ww w  .ja  v a2 s.  com
    FontAwesome icon = extraIconMap.get(mimeType);
    return (icon == null) ? FontAwesome.FILE_O : icon;
}

From source file:com.esofthead.mycollab.vaadin.ui.AttachmentPanel.java

License:Open Source License

private static FontAwesome getFileIconResource(String fileName) {
    String mimeType = MimeTypesUtil.detectMimeType(fileName);
    if (MimeTypesUtil.isImage(mimeType)) {
        return FontAwesome.FILE_IMAGE_O;
    } else if (MimeTypesUtil.isAudio(mimeType)) {
        return FontAwesome.FILE_AUDIO_O;
    } else if (MimeTypesUtil.isVideo(mimeType)) {
        return FontAwesome.FILE_VIDEO_O;
    } else if (MimeTypesUtil.isText(mimeType)) {
        return FontAwesome.FILE_TEXT_O;
    }/*from   w  ww .j ava2s. c om*/

    return FontAwesome.FILE_O;
}

From source file:com.selzlein.lojavirtual.vaadin.core.AppLayout.java

License:Open Source License

private void buildMenu() {
    if (user.hasRight(HumanRights.READ_ALL_TODO) || user.hasRight(HumanRights.READ_OWN_TODO)) {
        todoMenuItem = menu.addViewMenuItem(TodoListView.TITLE, TodoListView.ID, FontAwesome.LIST, todoBadge);
    }/*w w w.  j a va2 s. c o m*/
    if (user.hasRight(HumanRights.ACCESS_DOCUMENTS)) {
        documentMenuItem = menu.addViewMenuItem(DocumentsView.TITLE, DocumentsView.ID, FontAwesome.FILE_TEXT_O,
                documentBadge);

    }
    if (user.hasRight(EngineRights.READ_MODEL) && user.hasRight(EngineRights.CREATE_MODEL_INSTANCE)) {
        runModelMenuItem = menu.addViewMenuItem(RunModelView.TITLE, RunModelView.ID,
                FontAwesome.CARET_SQUARE_O_RIGHT, runModelBadge);
    }

    // Examples:
    // 1. add link to a custom document but only if the user has rights to access it.
    //      if (hasRightToOpenDocument("ExampleModule::exampleDoc")) {
    //         menu.addDocumentItem("example", "ExampleModule::exampleDoc", null, FontAwesome.ADN, null);
    //      }

    // 2. run model instance
    //      menu.addRunModelItem("example2", "ExampleModule", null, FontAwesome.ADJUST, null);

    // 3. menu separator
    //      menu.addMenuSeparator("example", 123);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java

License:Open Source License

/**
 * initializes the description layout/*from   w w w.  j  a  v a2s. c o m*/
 * 
 * @return
 */
VerticalLayout initDescription() {
    VerticalLayout projDescription = new VerticalLayout();
    VerticalLayout projDescriptionContent = new VerticalLayout();

    projDescription.setCaption("");
    projDescription.setIcon(FontAwesome.FILE_TEXT_O);

    descContent = new Label("");
    contact = new Label("", ContentMode.HTML);

    patientInformation = new Label("No patient information provided.", ContentMode.HTML);

    projDescriptionContent.addComponent(patientInformation);
    projDescriptionContent.addComponent(descContent);
    projDescriptionContent.addComponent(contact);
    projDescriptionContent.setMargin(new MarginInfo(true, false, true, true));
    projDescriptionContent.setSpacing(true);

    projDescription.addComponent(projDescriptionContent);

    descContent.setStyleName("patientview");
    contact.setStyleName("patientview");
    patientInformation.setStyleName("patientview");

    projDescription.setMargin(new MarginInfo(true, false, true, true));
    projDescription.setSpacing(true);
    projDescription.setWidth("100%");

    return projDescription;
}