Example usage for com.vaadin.server FontAwesome FILE_VIDEO_O

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

Introduction

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

Prototype

FontAwesome FILE_VIDEO_O

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

Click Source Link

Usage

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 .  j  a  v  a 2  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;
    }/* w w  w  .  ja  va2s  .  c om*/

    return FontAwesome.FILE_O;
}