List of usage examples for com.vaadin.server FontAwesome HISTORY
FontAwesome HISTORY
To view the source code for com.vaadin.server FontAwesome HISTORY.
Click Source Link
From source file:com.esofthead.mycollab.module.crm.ui.components.CrmPreviewFormControlsGenerator.java
License:Open Source License
public HorizontalLayout createButtonControls(int buttonEnableFlags, final String permissionItem) { layout.setStyleName("control-buttons"); layout.setSpacing(true);/*ww w. j a va 2s.co m*/ layout.setSizeUndefined(); boolean canRead = true; boolean canWrite = true; boolean canAccess = true; if (permissionItem != null) { canRead = AppContext.canRead(permissionItem); canWrite = AppContext.canWrite(permissionItem); canAccess = AppContext.canAccess(permissionItem); } MVerticalLayout popupButtonsControl = new MVerticalLayout() .withMargin(new MarginInfo(false, true, false, true)); if ((buttonEnableFlags & ADD_BTN_PRESENTED) == ADD_BTN_PRESENTED) { Button addBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_ADD), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { optionBtn.setPopupVisible(false); final T item = previewForm.getBean(); previewForm.fireAddForm(item); } }); addBtn.setIcon(FontAwesome.PLUS); addBtn.setStyleName(UIConstants.THEME_GREEN_LINK); addBtn.setEnabled(canWrite); layout.addComponent(addBtn); } if ((buttonEnableFlags & EDIT_BTN_PRESENTED) == EDIT_BTN_PRESENTED) { Button editBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { optionBtn.setPopupVisible(false); final T item = previewForm.getBean(); previewForm.fireEditForm(item); } }); editBtn.setIcon(FontAwesome.EDIT); editBtn.setStyleName(UIConstants.THEME_GREEN_LINK); editBtn.setEnabled(canWrite); layout.addComponent(editBtn); } if ((buttonEnableFlags & DELETE_BTN_PRESENTED) == DELETE_BTN_PRESENTED) { Button deleteBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { final T item = previewForm.getBean(); previewForm.fireDeleteForm(item); } }); deleteBtn.setIcon(FontAwesome.TRASH_O); deleteBtn.setStyleName(UIConstants.THEME_RED_LINK); layout.addComponent(deleteBtn); deleteBtn.setEnabled(canAccess); } if ((buttonEnableFlags & CLONE_BTN_PRESENTED) == CLONE_BTN_PRESENTED) { Button cloneBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CLONE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { optionBtn.setPopupVisible(false); final T item = previewForm.getBean(); previewForm.fireCloneForm(item); } }); cloneBtn.setIcon(FontAwesome.ROAD); cloneBtn.setStyleName("link"); popupButtonsControl.addComponent(cloneBtn); } if ((buttonEnableFlags & HISTORY_BTN_PRESENTED) == HISTORY_BTN_PRESENTED) { Button historyBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_HISTORY), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { optionBtn.setPopupVisible(false); previewForm.showHistory(); } }); historyBtn.setIcon(FontAwesome.HISTORY); historyBtn.setStyleName("link"); popupButtonsControl.addComponent(historyBtn); } optionBtn.setContent(popupButtonsControl); if ((buttonEnableFlags & CLONE_BTN_PRESENTED) == CLONE_BTN_PRESENTED | (buttonEnableFlags & EDIT_BTN_PRESENTED) == EDIT_BTN_PRESENTED) { layout.addComponent(optionBtn); } ButtonGroup navigationBtns = new ButtonGroup(); navigationBtns.setStyleName("navigation-btns"); if ((buttonEnableFlags & PREVIOUS_BTN_PRESENTED) == PREVIOUS_BTN_PRESENTED) { Button previousItem = new Button(null, new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { final T item = previewForm.getBean(); previewForm.fireGotoPrevious(item); } }); previousItem.setStyleName(UIConstants.THEME_GREEN_LINK); previousItem.setIcon(FontAwesome.CHEVRON_LEFT); previousItem.setDescription(AppContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_PREVIOUS_ITEM)); navigationBtns.addButton(previousItem); previousItem.setEnabled(canRead); } if ((buttonEnableFlags & NEXT_BTN_PRESENTED) == NEXT_BTN_PRESENTED) { Button nextItemBtn = new Button(null, new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(final ClickEvent event) { final T item = previewForm.getBean(); previewForm.fireGotoNextItem(item); } }); nextItemBtn.setStyleName(UIConstants.THEME_GREEN_LINK); nextItemBtn.setIcon(FontAwesome.CHEVRON_RIGHT); nextItemBtn.setDescription(AppContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_NEXT_ITEM)); navigationBtns.addButton(nextItemBtn); nextItemBtn.setEnabled(canRead); } layout.addComponent(navigationBtns); return layout; }
From source file:com.esofthead.mycollab.module.project.view.bug.BugReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { final TabSheetLazyLoadComponent tabBugDetail = new TabSheetLazyLoadComponent(); tabBugDetail.addTab(commentList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_COMMENT), FontAwesome.COMMENTS);/* www . ja va 2s . c o m*/ tabBugDetail.addTab(historyList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_HISTORY), FontAwesome.HISTORY); return tabBugDetail; }
From source file:com.esofthead.mycollab.module.project.view.bug.ComponentReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { final TabSheetLazyLoadComponent tabContainer = new TabSheetLazyLoadComponent(); tabContainer.addTab(commentDisplay, AppContext.getMessage(ProjectCommonI18nEnum.TAB_COMMENT), FontAwesome.COMMENTS);/*from w w w. ja va 2 s. c o m*/ tabContainer.addTab(historyLogList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_HISTORY), FontAwesome.HISTORY); return tabContainer; }
From source file:com.esofthead.mycollab.module.project.view.milestone.MilestoneReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { final TabSheetLazyLoadComponent tabContainer = new TabSheetLazyLoadComponent(); tabContainer.addTab(this.commentListComp, AppContext.getMessage(ProjectCommonI18nEnum.TAB_COMMENT), FontAwesome.COMMENTS);/* w w w.j a v a 2s. c o m*/ tabContainer.addTab(historyListComp, AppContext.getMessage(ProjectCommonI18nEnum.TAB_HISTORY), FontAwesome.HISTORY); return tabContainer; }
From source file:com.esofthead.mycollab.module.project.view.task.TaskGroupReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { final TabSheetLazyLoadComponent tabContainer = new TabSheetLazyLoadComponent(); tabContainer.addTab(commentList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_COMMENT), FontAwesome.COMMENTS);/*w w w . ja v a2 s.c o m*/ tabContainer.addTab(historyList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_HISTORY), FontAwesome.HISTORY); return tabContainer; }
From source file:com.esofthead.mycollab.module.project.view.task.TaskReadViewImpl.java
License:Open Source License
@Override protected ComponentContainer createBottomPanel() { TabSheetLazyLoadComponent tabTaskDetail = new TabSheetLazyLoadComponent(); tabTaskDetail.addTab(commentList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_COMMENT, 0), FontAwesome.COMMENTS);/*from w w w .j a v a 2s. co m*/ tabTaskDetail.addTab(historyList, AppContext.getMessage(ProjectCommonI18nEnum.TAB_HISTORY), FontAwesome.HISTORY); return tabTaskDetail; }
From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryGrid.java
License:Open Source License
private StatusFontIcon createTimeForcedLabelMetadata(final Action action) { StatusFontIcon result = null;//from w ww.j av a 2 s. c o m if (ActionType.TIMEFORCED.equals(action.getActionType())) { final long currentTimeMillis = System.currentTimeMillis(); String style; String title; if (action.isHitAutoForceTime(currentTimeMillis)) { style = STATUS_ICON_GREEN; final String duration = SPDateTimeUtil.getDurationFormattedString(action.getForcedTime(), currentTimeMillis, i18n); title = i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_FORCED_SINCE, duration); } else { style = STATUS_ICON_PENDING; final String duration = SPDateTimeUtil.getDurationFormattedString(currentTimeMillis, action.getForcedTime(), i18n); title = i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_FORCED_IN, duration); } result = new StatusFontIcon(FontAwesome.HISTORY, style, title, UIComponentIdProvider.ACTION_HISTORY_TABLE_TIMEFORCED_LABEL_ID); } return result; }
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 www.j a v a2 s . com*/ 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 ww. 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.ActionTypeOptionGroupAssignmentLayout.java
License:Open Source License
private void addAutoForceItemWithLabelAndDateField() { 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);// ww w . j av a 2s .co m 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.getCurrentLocale()); forcedTimeDateField.setResolution(Resolution.MINUTE); forcedTimeDateField.addStyleName(ValoTheme.DATEFIELD_SMALL); addComponent(forcedTimeDateField); }