Example usage for com.vaadin.server FontAwesome FILE_AUDIO_O

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

Introduction

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

Prototype

FontAwesome FILE_AUDIO_O

To view the source code for com.vaadin.server FontAwesome FILE_AUDIO_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   w  ww .j a va  2s  .  co  m*/
    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 w  w.  j  ava  2  s .c  o m

    return FontAwesome.FILE_O;
}