List of usage examples for com.vaadin.server FontAwesome TRASH_O
FontAwesome TRASH_O
To view the source code for com.vaadin.server FontAwesome TRASH_O.
Click Source Link
From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadLayout.java
License:Open Source License
private void createDiscardBtn() { discardBtn = SPUIComponentProvider.getButton(UIComponentIdProvider.UPLOAD_DISCARD_BUTTON, SPUILabelDefinitions.DISCARD, SPUILabelDefinitions.DISCARD, null, false, null, SPUIButtonStyleSmall.class); discardBtn.setIcon(FontAwesome.TRASH_O); discardBtn.addStyleName(SPUIStyleDefinitions.ACTION_BUTTON); discardBtn.addClickListener(this::discardUploadData); }
From source file:org.eclipse.hawkbit.ui.common.AbstractMetadataPopupLayout.java
License:Open Source License
private static IndexedContainer getMetadataContainer() { final IndexedContainer swcontactContainer = new IndexedContainer(); swcontactContainer.addContainerProperty(KEY, String.class, ""); swcontactContainer.addContainerProperty(VALUE, String.class, ""); swcontactContainer.addContainerProperty(DELETE_BUTTON, String.class, FontAwesome.TRASH_O.getHtml()); return swcontactContainer; }
From source file:org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons.java
License:Open Source License
private Object addDeleteCell(final Object itemId) { if (itemId instanceof TagIdName && noTagLabel.equals(((TagIdName) itemId).getName())) { return null; }//from w w w.j a va2s. c o m final Button deleteButton = SPUIComponentProvider.getButton("", "", "", "", true, FontAwesome.TRASH_O, SPUIButtonStyleNoBorder.class); if (itemId instanceof TagIdName) { deleteButton.setId(UIComponentIdProvider.DELETE_TAG_ID + ((TagIdName) itemId).getName()); } else { deleteButton.setId(UIComponentIdProvider.DELETE_TAG_ID + itemId.toString()); } deleteButton.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_DELETE)); deleteButton.addClickListener(this::addDeleteButtonClickListener); return deleteButton; }
From source file:org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout.java
License:Open Source License
private DragAndDropWrapper createDeleteWrapperLayout() { final Button dropToDelete = new Button(i18n.getMessage("label.components.drop.area")); dropToDelete.setCaptionAsHtml(true); dropToDelete.setIcon(FontAwesome.TRASH_O); dropToDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS); dropToDelete.addStyleName("drop-to-delete-button"); dropToDelete.addStyleName(SPUIStyleDefinitions.ACTION_BUTTON); dropToDelete.addStyleName(SPUIStyleDefinitions.DEL_ACTION_BUTTON); dropToDelete.addStyleName("delete-icon"); final DragAndDropWrapper wrapper = new DragAndDropWrapper(dropToDelete); wrapper.setStyleName(ValoTheme.BUTTON_PRIMARY); wrapper.setId(getDeleteAreaId());/*from ww w .ja v a 2 s .com*/ wrapper.setDropHandler(this); wrapper.addStyleName("delete-button-border"); return wrapper; }
From source file:org.eclipse.hawkbit.ui.common.table.AbstractTable.java
License:Open Source License
private Object createDeleteButton(final Object itemId) { final Button deleteButton = SPUIComponentProvider.getButton("", "", "", "", true, FontAwesome.TRASH_O, SPUIButtonStyleNoBorderWithIcon.class); final String id = getEntityId(itemId); deleteButton.setId("delete.entity." + id); deleteButton.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_DELETE)); deleteButton.addClickListener(this::addDeleteButtonClickListener); return deleteButton; }
From source file:org.eclipse.hawkbit.ui.components.ConfigMenuBar.java
License:Open Source License
private void addMenuItems() { if (createPermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_CREATE), FontAwesome.PLUS, addButtonCommand);// w w w. ja v a 2s. co m } if (updatePermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_EDIT), FontAwesome.EDIT, updateButtonCommand); } if (deletePermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_DELETE), FontAwesome.TRASH_O, deleteButtonCommand); } }
From source file:org.eclipse.hawkbit.ui.distributions.footer.DistributionsConfirmationWindowLayout.java
License:Open Source License
private ConfirmationTab createSMDeleteConfirmationTab() { final ConfirmationTab tab = new ConfirmationTab(); tab.getConfirmAll().setId(UIComponentIdProvider.SW_DELETE_ALL); tab.getConfirmAll().setIcon(FontAwesome.TRASH_O); tab.getConfirmAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DELETE_ALL)); tab.getConfirmAll().addClickListener(event -> deleteSMAll(tab)); tab.getDiscardAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DISCARD_ALL)); tab.getDiscardAll().addClickListener(event -> discardSMAll(tab)); /* Add items container to the table. */ tab.getTable().setContainerDataSource(getSWModuleTableContainer()); /* Add the discard action column */ tab.getTable().addGeneratedColumn(SW_DISCARD_CHGS, (source, itemId, columnId) -> { final ClickListener clickListener = event -> discardSoftwareDelete(event, itemId, tab); return createDiscardButton(itemId, clickListener); });//from www . j a v a2 s . c om tab.getTable().setVisibleColumns(SW_MODULE_NAME_MSG, SW_DISCARD_CHGS); tab.getTable().setColumnHeaders(i18n.getMessage("upload.swModuleTable.header"), i18n.getMessage("header.second.deletetarget.table")); tab.getTable().setColumnExpandRatio(SW_MODULE_NAME_MSG, SPUIDefinitions.TARGET_DISTRIBUTION_COLUMN_WIDTH); tab.getTable().setColumnExpandRatio(SW_DISCARD_CHGS, SPUIDefinitions.DISCARD_COLUMN_WIDTH); tab.getTable().setColumnAlignment(SW_DISCARD_CHGS, Align.CENTER); return tab; }
From source file:org.eclipse.hawkbit.ui.distributions.footer.DistributionsConfirmationWindowLayout.java
License:Open Source License
private void deleteSMAll(final ConfirmationTab tab) { final Set<Long> swmoduleIds = manageDistUIState.getDeleteSofwareModulesList().keySet(); if (manageDistUIState.getAssignedList() == null || manageDistUIState.getAssignedList().isEmpty()) { removeAssignedSoftwareModules(); }/*from w w w. j av a 2s. c o m*/ softwareModuleManagement.delete(swmoduleIds); eventBus.publish(this, new SoftwareModuleEvent(BaseEntityEventType.REMOVE_ENTITY, swmoduleIds)); addToConsolitatedMsg(FontAwesome.TRASH_O.getHtml() + SPUILabelDefinitions.HTML_SPACE + i18n.getMessage("message.swModule.deleted", swmoduleIds.size())); manageDistUIState.getDeleteSofwareModulesList().clear(); removeCurrentTab(tab); setActionMessage(i18n.getMessage("message.software.delete.success")); eventBus.publish(this, SaveActionWindowEvent.DELETE_ALL_SOFWARE); }
From source file:org.eclipse.hawkbit.ui.distributions.footer.DistributionsConfirmationWindowLayout.java
License:Open Source License
private ConfirmationTab createSMtypeDeleteConfirmationTab() { final ConfirmationTab tab = new ConfirmationTab(); tab.getConfirmAll().setId(UIComponentIdProvider.SAVE_DELETE_SW_MODULE_TYPE); tab.getConfirmAll().setIcon(FontAwesome.TRASH_O); tab.getConfirmAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DELETE_ALL)); tab.getConfirmAll().addClickListener(event -> deleteSMtypeAll(tab)); tab.getDiscardAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DISCARD_ALL)); tab.getDiscardAll().setId(UIComponentIdProvider.DISCARD_SW_MODULE_TYPE); tab.getDiscardAll().addClickListener(event -> discardSMtypeAll(tab)); // Add items container to the table. tab.getTable().setContainerDataSource(getSWModuleTypeTableContainer()); // Add the discard action column tab.getTable().addGeneratedColumn(DISCARD, (source, itemId, columnId) -> { final StringBuilder style = new StringBuilder(ValoTheme.BUTTON_TINY); style.append(' '); style.append(SPUIStyleDefinitions.REDICON); final Button deleteIcon = SPUIComponentProvider.getButton("", "", SPUILabelDefinitions.DISCARD, style.toString(), true, FontAwesome.REPLY, SPUIButtonStyleSmallNoBorder.class); deleteIcon.setData(itemId);/*from www.j a v a 2 s . co m*/ deleteIcon.setImmediate(true); deleteIcon.addClickListener(event -> discardSoftwareTypeDelete( (String) ((Button) event.getComponent()).getData(), itemId, tab)); return deleteIcon; }); tab.getTable().setVisibleColumns(SW_MODULE_TYPE_NAME, DISCARD); tab.getTable().setColumnHeaders(i18n.getMessage("header.first.delete.swmodule.type.table"), i18n.getMessage("header.second.delete.swmodule.type.table")); tab.getTable().setColumnExpandRatio(SW_MODULE_TYPE_NAME, 2); tab.getTable().setColumnExpandRatio(SW_DISCARD_CHGS, SPUIDefinitions.DISCARD_COLUMN_WIDTH); tab.getTable().setColumnAlignment(SW_DISCARD_CHGS, Align.CENTER); return tab; }
From source file:org.eclipse.hawkbit.ui.distributions.footer.DistributionsConfirmationWindowLayout.java
License:Open Source License
private ConfirmationTab createDistDeleteConfirmationTab() { final ConfirmationTab tab = new ConfirmationTab(); tab.getConfirmAll().setId(UIComponentIdProvider.DIST_DELETE_ALL); tab.getConfirmAll().setIcon(FontAwesome.TRASH_O); tab.getConfirmAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DELETE_ALL)); tab.getConfirmAll().addClickListener(event -> deleteDistAll(tab)); tab.getDiscardAll().setCaption(i18n.getMessage(SPUILabelDefinitions.BUTTON_DISCARD_ALL)); tab.getDiscardAll().addClickListener(event -> discardDistAll(tab)); /* Add items container to the table. */ tab.getTable().setContainerDataSource(getDistTableContainer()); /* Add the discard action column */ tab.getTable().addGeneratedColumn(DISCARD, (source, itemId, columnId) -> { final ClickListener clickListener = event -> discardDistDelete(event, itemId, tab); return createDiscardButton(itemId, clickListener); });/* w w w. ja va 2s.c o m*/ tab.getTable().setVisibleColumns(DIST_NAME, DISCARD); tab.getTable().setColumnHeaders(i18n.getMessage("header.one.deletedist.table"), i18n.getMessage("header.second.deletedist.table")); tab.getTable().setColumnExpandRatio(DIST_NAME, SPUIDefinitions.TARGET_DISTRIBUTION_COLUMN_WIDTH); tab.getTable().setColumnExpandRatio(DISCARD, SPUIDefinitions.DISCARD_COLUMN_WIDTH); tab.getTable().setColumnAlignment(DISCARD, Align.CENTER); return tab; }