List of usage examples for com.vaadin.server FontAwesome BOLT
FontAwesome BOLT
To view the source code for com.vaadin.server FontAwesome BOLT.
Click Source Link
From source file:com.mycollab.module.project.view.bug.BugReadViewImpl.java
License:Open Source License
@Override protected HorizontalLayout createButtonControls() { ProjectPreviewFormControlsGenerator<SimpleBug> bugPreviewFormControls = new ProjectPreviewFormControlsGenerator<>( previewForm);// w w w . j a v a 2 s . c om if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.BUGS)) { MButton linkBtn = new MButton(UserUIContext.getMessage(BugI18nEnum.OPT_BUG_DEPENDENCIES), clickEvent -> UI.getCurrent().addWindow(new LinkIssueWindow(beanItem))) .withIcon(FontAwesome.BOLT); bugPreviewFormControls.addOptionButton(linkBtn); } HorizontalLayout topPanel = bugPreviewFormControls.createButtonControls( ProjectPreviewFormControlsGenerator.ADD_BTN_PRESENTED | ProjectPreviewFormControlsGenerator.DELETE_BTN_PRESENTED | ProjectPreviewFormControlsGenerator.EDIT_BTN_PRESENTED | ProjectPreviewFormControlsGenerator.PRINT_BTN_PRESENTED | ProjectPreviewFormControlsGenerator.CLONE_BTN_PRESENTED | ProjectPreviewFormControlsGenerator.NAVIGATOR_BTN_PRESENTED, ProjectRolePermissionCollections.BUGS); MButton assignBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ASSIGN), clickEvent -> UI.getCurrent().addWindow(new AssignBugWindow(beanItem))).withIcon(FontAwesome.SHARE) .withStyleName(WebThemes.BUTTON_ACTION); assignBtn.setVisible(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.BUGS)); bugWorkflowControl = new CssLayout(); bugPreviewFormControls.insertToControlBlock(bugWorkflowControl); bugPreviewFormControls.insertToControlBlock(assignBtn); topPanel.setSizeUndefined(); return topPanel; }
From source file:org.eclipse.hawkbit.ui.filtermanagement.TargetFilterTable.java
License:Open Source License
private Button customFilterDistributionSetButton(final Long itemId) { final Item row1 = getItem(itemId); final ProxyDistribution distSet = (ProxyDistribution) row1 .getItemProperty(SPUILabelDefinitions.AUTO_ASSIGN_DISTRIBUTION_SET).getValue(); final ActionType actionType = (ActionType) row1 .getItemProperty(SPUILabelDefinitions.AUTO_ASSIGN_ACTION_TYPE).getValue(); final String buttonId = "distSetButton"; Button updateIcon;//from www . j a v a2s. c o m if (distSet == null) { updateIcon = SPUIComponentProvider.getButton(buttonId, i18n.getMessage(UIMessageIdProvider.BUTTON_NO_AUTO_ASSIGNMENT), i18n.getMessage(UIMessageIdProvider.BUTTON_AUTO_ASSIGNMENT_DESCRIPTION), null, false, null, SPUIButtonStyleNoBorder.class); } else { updateIcon = actionType.equals(ActionType.FORCED) ? SPUIComponentProvider.getButton(buttonId, distSet.getNameVersion(), i18n.getMessage(UIMessageIdProvider.BUTTON_AUTO_ASSIGNMENT_DESCRIPTION), null, false, FontAwesome.BOLT, SPUIButtonStyleNoBorderWithIcon.class) : SPUIComponentProvider.getButton(buttonId, distSet.getNameVersion(), i18n.getMessage(UIMessageIdProvider.BUTTON_AUTO_ASSIGNMENT_DESCRIPTION), null, false, null, SPUIButtonStyleNoBorder.class); updateIcon.setSizeUndefined(); } updateIcon.addClickListener(this::onClickOfDistributionSetButton); updateIcon.setData(row1); updateIcon.addStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link"); return updateIcon; }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryGrid.java
License:Open Source License
private StatusFontIcon createForceButtonMetadata(final Action action) { final boolean isDisabled = !action.isActive() || action.isForce() || action.isCancelingOrCanceled() || !permissionChecker.hasUpdateTargetPermission(); return new StatusFontIcon(FontAwesome.BOLT, STATUS_ICON_NEUTRAL, i18n.getMessage("message.force.action"), UIComponentIdProvider.ACTION_HISTORY_TABLE_FORCE_ID, isDisabled); }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryGrid.java
License:Open Source License
private StatusFontIcon createForcedLabelMetadata(final Action action) { StatusFontIcon result = null;/*ww w.jav a 2 s . co m*/ if (ActionType.FORCED.equals(action.getActionType()) || ActionType.TIMEFORCED.equals(action.getActionType())) { result = new StatusFontIcon(FontAwesome.BOLT, STATUS_ICON_FORCED, i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED), UIComponentIdProvider.ACTION_HISTORY_TABLE_FORCED_LABEL_ID); } return result; }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java
License:Open Source License
private Component getForcedColumn(final Object itemId) { final Action actionWithActiveStatus = (Action) hierarchicalContainer.getItem(itemId) .getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_FORCED).getValue(); final Label actionLabel = new LabelBuilder().name("").buildCaptionLabel(); actionLabel.setContentMode(ContentMode.HTML); actionLabel.setStyleName("action-history-table-col-forced-label"); if (actionWithActiveStatus != null && actionWithActiveStatus.getActionType() == ActionType.FORCED) { actionLabel.setValue(FontAwesome.BOLT.getHtml()); // setted Id for Forced. actionLabel.setId("action.history.table.forcedId"); } else if (actionWithActiveStatus != null && actionWithActiveStatus.getActionType() == ActionType.TIMEFORCED) { return actionLabelWithTimeForceIcon(actionWithActiveStatus, actionLabel); }/*from ww w . jav a 2s. co m*/ return actionLabel; }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java
License:Open Source License
private HorizontalLayout createActionBarColumn(final Object itemId) { final HorizontalLayout actionBar = new HorizontalLayout(); final Item item = hierarchicalContainer.getItem(itemId); final Long actionId = (Long) item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTION_ID_HIDDEN) .getValue();//w ww. j a v a 2 s. co m final String activeValue = (String) item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTIVE_HIDDEN) .getValue(); final Action actionWithActiveStatus = (Action) item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_FORCED) .getValue(); if (actionWithActiveStatus == null) { return null; } final boolean isActionActive = target != null && SPUIDefinitions.ACTIVE.equals(activeValue); final Button actionCancel = SPUIComponentProvider.getButton( UIComponentIdProvider.ACTION_HISTORY_TABLE_CANCEL_ID, "", i18n.get("message.cancel.action"), ValoTheme.BUTTON_TINY, true, FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class); actionCancel.setEnabled(isActionActive && !actionWithActiveStatus.isCancelingOrCanceled()); actionCancel.addClickListener(event -> confirmAndCancelAction(actionId)); final Button actionForce = SPUIComponentProvider.getButton( UIComponentIdProvider.ACTION_HISTORY_TABLE_FORCE_ID, "", i18n.get("message.force.action"), ValoTheme.BUTTON_TINY, true, FontAwesome.BOLT, SPUIButtonStyleSmallNoBorder.class); actionForce.setEnabled(isActionActive && !actionWithActiveStatus.isForce() && !actionWithActiveStatus.isCancelingOrCanceled()); actionForce.addClickListener(event -> confirmAndForceAction(actionId)); final Button actionForceQuit = SPUIComponentProvider.getButton( UIComponentIdProvider.ACTION_HISTORY_TABLE_FORCE_QUIT_ID, "", i18n.get("message.forcequit.action"), ValoTheme.BUTTON_TINY + " redicon", true, FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class); actionForceQuit.setEnabled(isActionActive && actionWithActiveStatus.isCancelingOrCanceled()); actionForceQuit.addClickListener(event -> confirmAndForceQuitAction(actionId)); actionBar.addComponents(actionCancel, actionForce, actionForceQuit); return actionBar; }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java
License:Open Source License
private Component actionLabelWithTimeForceIcon(final Action actionWithActiveStatus, final Label actionLabel) { final long currentTimeMillis = System.currentTimeMillis(); final HorizontalLayout hLayout = new HorizontalLayout(); final Label autoForceLabel = new LabelBuilder().name("").id("action.history.table.timedforceId") .buildLabel();/*from ww w.jav a2s .c o m*/ actionLabel.setValue(FontAwesome.BOLT.getHtml()); autoForceLabel.setContentMode(ContentMode.HTML); autoForceLabel.setValue(FontAwesome.HISTORY.getHtml()); hLayout.addComponent(actionLabel); hLayout.addComponent(autoForceLabel); if (actionWithActiveStatus.isHitAutoForceTime(currentTimeMillis)) { autoForceLabel.setDescription("autoforced"); autoForceLabel.setStyleName(STATUS_ICON_GREEN); autoForceLabel.setDescription("auto forced since " + SPDateTimeUtil .getDurationFormattedString(actionWithActiveStatus.getForcedTime(), currentTimeMillis, i18n)); } else { autoForceLabel.setDescription("auto forcing in " + SPDateTimeUtil .getDurationFormattedString(currentTimeMillis, actionWithActiveStatus.getForcedTime(), i18n)); autoForceLabel.setStyleName("statusIconPending"); autoForceLabel.setValue(FontAwesome.HISTORY.getHtml()); } return hLayout; }
From source file:org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout.java
License:Open Source License
private void createOptionGroup() { actionTypeOptionGroup = new FlexibleOptionGroup(); actionTypeOptionGroup.addItem(ActionTypeOption.SOFT); actionTypeOptionGroup.addItem(ActionTypeOption.FORCED); actionTypeOptionGroup.addItem(ActionTypeOption.AUTO_FORCED); selectDefaultOption();/*w w w. j a v a2 s .c o m*/ final FlexibleOptionGroupItemComponent forceItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.FORCED); forceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); // set Id for Forced radio button. forceItem.setId("save.action.radio.forced"); addComponent(forceItem); final Label forceLabel = new Label(); forceLabel.setStyleName("statusIconPending"); forceLabel.setIcon(FontAwesome.BOLT); forceLabel.setCaption("Forced"); forceLabel.setDescription(i18n.getMessage("tooltip.forced.item")); forceLabel.setStyleName("padding-right-style"); addComponent(forceLabel); final FlexibleOptionGroupItemComponent softItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.SOFT); softItem.setId(UIComponentIdProvider.ACTION_DETAILS_SOFT_ID); softItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); addComponent(softItem); final Label softLabel = new Label(); softLabel.setSizeFull(); softLabel.setCaption("Soft"); softLabel.setDescription(i18n.getMessage("tooltip.soft.item")); softLabel.setStyleName("padding-right-style"); addComponent(softLabel); final FlexibleOptionGroupItemComponent autoForceItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.AUTO_FORCED); autoForceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); // setted Id for Time Forced radio button. autoForceItem.setId(UIComponentIdProvider.ACTION_TYPE_OPTION_GROUP_SAVE_TIMEFORCED); addComponent(autoForceItem); final Label autoForceLabel = new Label(); autoForceLabel.setStyleName("statusIconPending"); autoForceLabel.setIcon(FontAwesome.HISTORY); autoForceLabel.setCaption("Time Forced"); autoForceLabel.setDescription(i18n.getMessage("tooltip.timeforced.item")); autoForceLabel.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); addComponent(autoForceLabel); forcedTimeDateField = new DateField(); forcedTimeDateField.setInvalidAllowed(false); forcedTimeDateField.setInvalidCommitted(false); forcedTimeDateField.setEnabled(false); forcedTimeDateField.setStyleName("dist-window-forcedtime"); final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone(); forcedTimeDateField.setValue( Date.from(LocalDateTime.now().plusWeeks(2).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant())); forcedTimeDateField.setImmediate(true); forcedTimeDateField.setTimeZone(tz); forcedTimeDateField.setLocale(HawkbitCommonUtil.getLocale()); forcedTimeDateField.setResolution(Resolution.MINUTE); forcedTimeDateField.addStyleName(ValoTheme.DATEFIELD_SMALL); addComponent(forcedTimeDateField); }
From source file:org.eclipse.hawkbit.ui.management.miscs.AbstractActionTypeOptionGroupLayout.java
License:Open Source License
protected void addForcedItemWithLabel() { final FlexibleOptionGroupItemComponent forceItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.FORCED); forceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); forceItem.setId(UIComponentIdProvider.SAVE_ACTION_RADIO_FORCED); addComponent(forceItem);//from w ww . j a v a 2s . c o m final Label forceLabel = new Label(); forceLabel.setStyleName("statusIconPending"); forceLabel.setIcon(FontAwesome.BOLT); forceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED)); forceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_FORCED_ITEM)); forceLabel.setStyleName("padding-right-style"); addComponent(forceLabel); }
From source file:org.eclipse.hawkbit.ui.management.miscs.ActionTypeOptionGroupLayout.java
License:Open Source License
private void createOptionGroup() { actionTypeOptionGroup = new FlexibleOptionGroup(); actionTypeOptionGroup.addItem(ActionTypeOption.SOFT); actionTypeOptionGroup.addItem(ActionTypeOption.FORCED); actionTypeOptionGroup.addItem(ActionTypeOption.AUTO_FORCED); selectDefaultOption();// ww w .j av a 2 s . c om final FlexibleOptionGroupItemComponent forceItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.FORCED); forceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); forceItem.setId(UIComponentIdProvider.SAVE_ACTION_RADIO_FORCED); addComponent(forceItem); final Label forceLabel = new Label(); forceLabel.setStyleName("statusIconPending"); forceLabel.setIcon(FontAwesome.BOLT); forceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED)); forceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_FORCED_ITEM)); forceLabel.setStyleName("padding-right-style"); addComponent(forceLabel); final FlexibleOptionGroupItemComponent softItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.SOFT); softItem.setId(UIComponentIdProvider.ACTION_DETAILS_SOFT_ID); softItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); addComponent(softItem); final Label softLabel = new Label(); softLabel.setSizeFull(); softLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_SOFT)); softLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_SOFT_ITEM)); softLabel.setStyleName("padding-right-style"); addComponent(softLabel); final FlexibleOptionGroupItemComponent autoForceItem = actionTypeOptionGroup .getItemComponent(ActionTypeOption.AUTO_FORCED); autoForceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); autoForceItem.setId(UIComponentIdProvider.ACTION_TYPE_OPTION_GROUP_SAVE_TIMEFORCED); addComponent(autoForceItem); final Label autoForceLabel = new Label(); autoForceLabel.setStyleName("statusIconPending"); autoForceLabel.setIcon(FontAwesome.HISTORY); autoForceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_TIME_FORCED)); autoForceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_ITEM)); autoForceLabel.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE); addComponent(autoForceLabel); forcedTimeDateField = new DateField(); forcedTimeDateField.setInvalidAllowed(false); forcedTimeDateField.setInvalidCommitted(false); forcedTimeDateField.setEnabled(false); forcedTimeDateField.setStyleName("dist-window-forcedtime"); final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone(); forcedTimeDateField.setValue( Date.from(LocalDateTime.now().plusWeeks(2).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant())); forcedTimeDateField.setImmediate(true); forcedTimeDateField.setTimeZone(tz); forcedTimeDateField.setLocale(HawkbitCommonUtil.getLocale()); forcedTimeDateField.setResolution(Resolution.MINUTE); forcedTimeDateField.addStyleName(ValoTheme.DATEFIELD_SMALL); addComponent(forcedTimeDateField); }