Example usage for com.vaadin.server FontAwesome HOURGLASS_1

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

Introduction

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

Prototype

FontAwesome HOURGLASS_1

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

Click Source Link

Usage

From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java

License:Open Source License

/**
 * Get status icon.//from w w w .  j  a  v a 2  s  . c o  m
 *
 * @param status
 *            as Status
 * @return Label as UI
 */
private Label getStatusIcon(final Action.Status status) {
    final Label label = new LabelBuilder().name("").buildLabel();
    final String statusIconPending = "statusIconPending";
    label.setContentMode(ContentMode.HTML);
    if (Action.Status.FINISHED == status) {
        label.setDescription(i18n.get("label.finished"));
        label.setStyleName(STATUS_ICON_GREEN);
        label.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
    } else if (Action.Status.ERROR == status) {
        label.setDescription(i18n.get("label.error"));
        label.setStyleName("statusIconRed");
        label.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
    } else if (Action.Status.WARNING == status) {
        label.setStyleName("statusIconOrange");
        label.setDescription(i18n.get("label.warning"));
        label.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
    } else if (Action.Status.RUNNING == status) {
        // dynamic spinner
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.running"));
        label.setValue(FontAwesome.ADJUST.getHtml());
    } else if (Action.Status.CANCELING == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.cancelling"));
        label.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
    } else if (Action.Status.CANCELED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.cancelled"));
        label.setStyleName(STATUS_ICON_GREEN);
        label.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
    } else if (Action.Status.RETRIEVED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.retrieved"));
        label.setValue(FontAwesome.CIRCLE_O.getHtml());
    } else if (Action.Status.DOWNLOAD == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.download"));
        label.setValue(FontAwesome.CLOUD_DOWNLOAD.getHtml());
    } else if (Action.Status.SCHEDULED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.scheduled"));
        label.setValue(FontAwesome.HOURGLASS_1.getHtml());
    } else {
        label.setDescription("");
        label.setValue("");
    }
    return label;

}

From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java

License:Open Source License

/**
 * Create Status Label./* ww  w  .  j a va 2 s  .c  o m*/
 *
 * @param activeValue
 *            as String
 * @return Labeal as UI
 */
private static Label createActiveStatusLabel(final String activeValue, final boolean endedWithError) {
    final Label label = new LabelBuilder().name("").buildLabel();
    label.setContentMode(ContentMode.HTML);
    if (SPUIDefinitions.SCHEDULED.equals(activeValue)) {
        label.setDescription("Scheduled");
        label.setValue(FontAwesome.HOURGLASS_1.getHtml());
    } else if (SPUIDefinitions.ACTIVE.equals(activeValue)) {
        label.setDescription("Active");
        label.setStyleName("statusIconActive");
    } else if (SPUIDefinitions.IN_ACTIVE.equals(activeValue)) {
        if (endedWithError) {
            label.setStyleName("statusIconRed");
        } else {
            label.setStyleName("statusIconNeutral");
        }
        label.setDescription("In-active");
        label.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
    } else {
        label.setValue("");
    }
    return label;
}