Example usage for com.vaadin.server FontAwesome CLOCK_O

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

Introduction

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

Prototype

FontAwesome CLOCK_O

To view the source code for com.vaadin.server FontAwesome CLOCK_O.

Click Source Link

Usage

From source file:org.eclipse.hawkbit.ui.management.targettable.TargetTable.java

License:Open Source License

private Label getTargetPollTime(final Object itemId) {
    final Label statusLabel = new Label();
    statusLabel.addStyleName(ValoTheme.LABEL_SMALL);
    statusLabel.setHeightUndefined();/*from www . j  ava2 s  .c om*/
    statusLabel.setContentMode(ContentMode.HTML);
    final String pollStatusToolTip = (String) getContainerDataSource().getItem(itemId)
            .getItemProperty(SPUILabelDefinitions.VAR_POLL_STATUS_TOOL_TIP).getValue();
    if (StringUtils.hasText(pollStatusToolTip)) {
        statusLabel.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
        statusLabel.setDescription(pollStatusToolTip);
    } else {
        statusLabel.setValue(FontAwesome.CLOCK_O.getHtml());
        statusLabel.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_IN_TIME));
    }

    return statusLabel;
}

From source file:org.eclipse.hawkbit.ui.rollout.rollout.AutoStartOptionGroupLayout.java

License:Open Source License

private void createOptionGroup() {
    autoStartOptionGroup = new FlexibleOptionGroup();
    autoStartOptionGroup.addItem(AutoStartOption.MANUAL);
    autoStartOptionGroup.addItem(AutoStartOption.AUTO_START);
    autoStartOptionGroup.addItem(AutoStartOption.SCHEDULED);
    selectDefaultOption();//  www .j a v  a2 s . co  m

    final FlexibleOptionGroupItemComponent manualItem = autoStartOptionGroup
            .getItemComponent(AutoStartOption.MANUAL);
    manualItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
    // set Id for Forced radio button.
    manualItem.setId(UIComponentIdProvider.ROLLOUT_START_MANUAL_ID);
    addComponent(manualItem);
    final Label manualLabel = new Label();
    manualLabel.setStyleName("statusIconPending");
    manualLabel.setIcon(FontAwesome.HAND_PAPER_O);
    manualLabel.setCaption(i18n.getMessage("caption.rollout.start.manual"));
    manualLabel.setDescription(i18n.getMessage("caption.rollout.start.manual.desc"));
    manualLabel.setStyleName("padding-right-style");
    addComponent(manualLabel);

    final FlexibleOptionGroupItemComponent autoStartItem = autoStartOptionGroup
            .getItemComponent(AutoStartOption.AUTO_START);
    autoStartItem.setId(UIComponentIdProvider.ROLLOUT_START_AUTO_ID);
    autoStartItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
    addComponent(autoStartItem);
    final Label autoStartLabel = new Label();
    autoStartLabel.setSizeFull();
    autoStartLabel.setIcon(FontAwesome.PLAY);
    autoStartLabel.setCaption(i18n.getMessage("caption.rollout.start.auto"));
    autoStartLabel.setDescription(i18n.getMessage("caption.rollout.start.auto.desc"));
    autoStartLabel.setStyleName("padding-right-style");
    addComponent(autoStartLabel);

    final FlexibleOptionGroupItemComponent scheduledItem = autoStartOptionGroup
            .getItemComponent(AutoStartOption.SCHEDULED);
    scheduledItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
    // setted Id for Time Forced radio button.
    scheduledItem.setId(UIComponentIdProvider.ROLLOUT_START_SCHEDULED_ID);
    addComponent(scheduledItem);
    final Label scheduledLabel = new Label();
    scheduledLabel.setStyleName("statusIconPending");
    scheduledLabel.setIcon(FontAwesome.CLOCK_O);
    scheduledLabel.setCaption(i18n.getMessage("caption.rollout.start.scheduled"));
    scheduledLabel.setDescription(i18n.getMessage("caption.rollout.start.scheduled.desc"));
    scheduledLabel.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
    addComponent(scheduledLabel);

    startAtDateField = new DateField();
    startAtDateField.setInvalidAllowed(false);
    startAtDateField.setInvalidCommitted(false);
    startAtDateField.setEnabled(false);
    startAtDateField.setStyleName("dist-window-forcedtime");

    final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
    startAtDateField.setValue(Date
            .from(LocalDateTime.now().plusMinutes(30).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant()));
    startAtDateField.setImmediate(true);
    startAtDateField.setTimeZone(tz);
    startAtDateField.setLocale(HawkbitCommonUtil.getCurrentLocale());
    startAtDateField.setResolution(Resolution.MINUTE);
    startAtDateField.addStyleName(ValoTheme.DATEFIELD_SMALL);
    addComponent(startAtDateField);
}

From source file:org.lucidj.browser.AbstractCell.java

License:Apache License

public void setRunning(boolean visible, ComponentState state) {
    if (visible) {
        if (state != null) {
            task_state = state.getState();

            if (task_state == ComponentState.ACTIVE || task_state == ComponentState.TERMINATED) {
                // Ready to run visible only with hover or selection
                running.removeStyleName("component-task-state-visible");
            } else {
                // All other states are always visible
                running.addStyleName("component-task-state-visible");
            }//from   w ww  .  j  ava 2 s  . co m

            String color = "inherit";
            String html = "S" + String.valueOf(state.getState());
            String title = "State " + String.valueOf(state.getState());

            switch (task_state) // Also record the rendered state
            {
            case ComponentState.INIT: {
                html = FontAwesome.CLOCK_O.getHtml();
                title = "Task awaiting initialization";
                break;
            }
            case ComponentState.ABORTED: {
                color = "red";
                html = "<span class='component-task-runnable'>" + FontAwesome.WARNING.getHtml() + "</span>";
                title = "Task aborted, can try to run";
                break;
            }
            case ComponentState.ACTIVE: {
                color = "green";
                html = FontAwesome.PLAY.getHtml();
                title = "Run task";
                break;
            }
            case ComponentState.TERMINATED: {
                color = "green";
                html = FontAwesome.PLAY.getHtml();
                title = "Task finished, can run again";
                break;
            }
            case ComponentState.INTERRUPTED: {
                color = "blue";
                html = "<span class='component-task-runnable'>" + FontAwesome.PAUSE.getHtml() + "</span>";
                title = "Task interrupted by user, can run again";
                break;
            }
            case ComponentState.RUNNING: {
                color = "red";
                html = FontAwesome.STOP.getHtml();
                title = "Task running";
                break;
            }
            }

            running.setValue("<span style='color:" + color + ";' title='" + title + "'>" + html + "</span>");
        } else {
            running.setValue("");
        }
    }
    running.setVisible(visible);
}