List of usage examples for com.vaadin.server FontAwesome FILE_O
FontAwesome FILE_O
To view the source code for com.vaadin.server FontAwesome FILE_O.
Click Source Link
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 w w . j av a 2 s . c o 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; }// w ww. ja v a2 s . c o m return FontAwesome.FILE_O; }
From source file:com.hybridbpm.ui.view.DocumentView.java
License:Apache License
public DocumentView() { Design.read(this); tabSheet.getTab(documentsLayout).setCaption(Translate.getMessage("Documents")); btnSearch.setCaption(Translate.getMessage("btnSearch")); btnRefresh.setCaption(Translate.getMessage("btnRefresh")); btnAddFile.setCaption(Translate.getMessage("btnAddFile")); btnAddFolder.setCaption(Translate.getMessage("btnAddFolder")); textFieldSearch.setCaption(Translate.getMessage("textFieldSearch")); Responsive.makeResponsive(panelLayout); btnAddFolder.setIcon(FontAwesome.FOLDER_O); btnAddFolder.addClickListener(this); btnAddFile.setIcon(FontAwesome.FILE_O); btnAddFile.addClickListener(this); btnRefresh.setIcon(FontAwesome.REFRESH); btnRefresh.addClickListener(this); textFieldSearch.setIcon(FontAwesome.SEARCH); documentsLayout.setMargin(new MarginInfo(true, false, false, false)); documentsLayout.setExpandRatio(documentTable, 1f); documentTable.addContainerProperty("name", String.class, null, Translate.getMessage("tableDocumentsName"), null, Table.Align.LEFT);//from w w w .ja va 2 s . c o m documentTable.setColumnExpandRatio("name", 1f); documentTable.addContainerProperty("description", String.class, null, Translate.getMessage("tableDocumentsTitle"), null, Table.Align.LEFT); documentTable.addContainerProperty("creator", String.class, null, Translate.getMessage("tableDocumentsCreator"), null, Table.Align.LEFT); documentTable.addContainerProperty("createDate", Date.class, null, Translate.getMessage("tableDocumentsCreateDate"), null, Table.Align.LEFT); documentTable.addContainerProperty("updateDate", Date.class, null, Translate.getMessage("tableDocumentsUpdateDate"), null, Table.Align.LEFT); documentTable.addContainerProperty("actions", TableButtonBar.class, null, Translate.getMessage("tableDocumentsActions"), null, Table.Align.LEFT); documentTable.setColumnWidth("createDate", 150); documentTable.setColumnWidth("updateDate", 150); documentTable.setColumnWidth("actions", 55); documentTable.addGeneratedColumn("name", new DocumentColumnGenerator(this)); documentTable.addGeneratedColumn("createDate", new DateColumnGenerator()); documentTable.addGeneratedColumn("updateDate", new DateColumnGenerator()); documentTable.setVisibleColumns("name", "description", "creator", "createDate", "updateDate", "actions"); tabSheet.addSelectedTabChangeListener(this); }
From source file:com.moscaville.ui.CsvVaadinUI.java
private void buildTemplateGridHeader() { HorizontalLayout templateGridHeaderLayout = new HorizontalLayout(); templateGridHeaderLayout.setSpacing(true); templateGridHeaderLayout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); Button btnNew = new Button("New", FontAwesome.FILE); btnNew.setDescription("New template file"); btnNew.addClickListener((Button.ClickEvent event) -> { templateManager.newTemplate();/* w w w.j a va2 s. c o m*/ }); templateGridHeaderLayout.addComponent(btnNew); Button btnOpen = new Button("Open", FontAwesome.FILE_O); btnOpen.setDescription("Open template file"); btnOpen.addClickListener((Button.ClickEvent event) -> { fileChooser.setFileExtension(FileChooser.FILE_EXTENSION_TEMPLATE); addWindow(fileChooser); }); templateGridHeaderLayout.addComponent(btnOpen); Button btnSave = new Button("Save", FontAwesome.SAVE); tfTemplateFileName = new TextField(); tfTemplateFileName.setDescription("template file name"); tfTemplateFileName.setInputPrompt("template file name"); tfTemplateFileName.setImmediate(true); tfTemplateFileName.addValueChangeListener((Property.ValueChangeEvent event) -> { btnSave.setEnabled(tfTemplateFileName.getValue() != null && tfTemplateFileName.getValue().length() > 0); }); templateGridHeaderLayout.addComponent(tfTemplateFileName); FieldGroup binder = new FieldGroup(templateManager.getTemplateBeanItem()); binder.setBuffered(false); binder.bind(tfTemplateFileName, "templateFileName"); btnSave.setDescription("Save template file"); btnSave.setImmediate(true); btnSave.setEnabled(false); btnSave.addClickListener((Button.ClickEvent event) -> { templateManager.saveTemplate(); }); templateGridHeaderLayout.addComponent(btnSave); Button btnData = new Button("Data", FontAwesome.DATABASE); btnData.setDescription("Load data"); btnData.addClickListener((Button.ClickEvent event) -> { fileChooser.setFileExtension(FileChooser.FILE_EXTENSION_CSV); addWindow(fileChooser); }); templateGridHeaderLayout.addComponent(btnData); Button btnImport = new Button("Import", FontAwesome.DOWNLOAD); templateGridHeaderLayout.addComponent(btnImport); mainLayout.addComponent(templateGridHeaderLayout); }
From source file:org.eclipse.hawkbit.ui.distributions.smtable.SwModuleDetails.java
License:Open Source License
private Button createShowArtifactDetailsButton() { artifactDetailsButton = SPUIComponentProvider.getButton("", "", "", null, false, FontAwesome.FILE_O, SPUIButtonStyleNoBorder.class); artifactDetailsButton.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_ARTIFACT_ICON)); artifactDetailsButton.addClickListener(event -> showArtifactDetailsWindow(getSelectedBaseEntity())); return artifactDetailsButton; }