Example usage for com.vaadin.server FontAwesome WARNING

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

Introduction

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

Prototype

FontAwesome WARNING

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.mobile.mvp.view.NotPresenterView.java

License:Open Source License

void display() {
    setContent(new MVerticalLayout().withFullWidth()
            .with(new MVerticalLayout(new ELabel(FontAwesome.WARNING.getHtml(), ContentMode.HTML),
                    new ELabel("This feature is currently not available in your MyCollab instance",
                            ContentMode.HTML).withStyleName(UIConstants.LABEL_H3))
                                    .alignAll(Alignment.MIDDLE_CENTER)));
}

From source file:com.mycollab.mobile.mvp.view.NotPresenterView.java

License:Open Source License

void display() {
    setContent(new MVerticalLayout().withFullWidth()
            .with(new MVerticalLayout(ELabel.fontIcon(FontAwesome.WARNING),
                    new ELabel(UserUIContext.getMessage(LicenseI18nEnum.FEATURE_NOT_AVAILABLE)))
                            .alignAll(Alignment.MIDDLE_CENTER)));
}

From source file:com.toptal.ui.view.LoginView.java

License:Open Source License

/**
 * Error notification.//from  w w w  .  ja v a  2 s. co  m
 * @param message Message.
 */
private void error(final String message) {
    final int delay = 5000;
    final Notification notification = new Notification(message, Notification.Type.WARNING_MESSAGE);
    notification.setHtmlContentAllowed(true);
    notification.setStyleName("closable");
    notification.setPosition(Position.BOTTOM_CENTER);
    notification.setIcon(FontAwesome.WARNING);
    notification.setDelayMsec(delay);
    notification.show(Page.getCurrent());
}

From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadConfirmationWindow.java

License:Open Source License

private static Label getWarningLabel() {
    final Label warningIconLabel = new Label();
    warningIconLabel.addStyleName(ValoTheme.LABEL_SMALL);
    warningIconLabel.setHeightUndefined();
    warningIconLabel.setContentMode(ContentMode.HTML);
    warningIconLabel.setValue(FontAwesome.WARNING.getHtml());
    warningIconLabel.addStyleName("warningLabel");
    warningIconLabel.setVisible(false);/*from  w w  w.j a v a  2s.  com*/
    return warningIconLabel;
}

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

License:Open Source License

/**
 * Show confirmation window and if ok then only, force quit action.
 *
 * @param actionId//from   w  w w . j  a  v a 2 s  . c  o m
 *            as Id if the action needs to be forced.
 */
private void confirmAndForceQuitAction(final Long actionId) {
    /* Display the confirmation */
    final ConfirmationDialog confirmDialog = new ConfirmationDialog(
            i18n.getMessage("caption.forcequit.action.confirmbox"),
            i18n.getMessage("message.forcequit.action.confirm"), i18n.getMessage(UIMessageIdProvider.BUTTON_OK),
            i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), ok -> {
                if (!ok) {
                    return;
                }
                final boolean cancelResult = forceQuitActiveAction(actionId);
                if (cancelResult) {
                    populateAndUpdateTargetDetails(selectedTarget);
                    notification.displaySuccess(i18n.getMessage("message.forcequit.action.success"));
                } else {
                    notification.displayValidationError(i18n.getMessage("message.forcequit.action.failed"));
                }
            }, FontAwesome.WARNING, UIComponentIdProvider.CONFIRMATION_POPUP_ID, null);
    UI.getCurrent().addWindow(confirmDialog.getWindow());

    confirmDialog.getWindow().bringToFront();
}

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

License:Open Source License

private void confirmAndForceQuitAction(final Long actionId) {
    /* Display the confirmation */
    final ConfirmationDialog confirmDialog = new ConfirmationDialog(
            i18n.get("caption.forcequit.action.confirmbox"), i18n.get("message.forcequit.action.confirm"),
            i18n.get(BUTTON_OK), i18n.get(BUTTON_CANCEL), ok -> {
                if (!ok) {
                    return;
                }/*from   w w w  . ja  v a  2  s. c o  m*/
                final boolean cancelResult = forceQuitActiveAction(actionId);
                if (cancelResult) {
                    populateAndupdateTargetDetails(target);
                    notification.displaySuccess(i18n.get("message.forcequit.action.success"));
                } else {
                    notification.displayValidationError(i18n.get("message.forcequit.action.failed"));
                }
            }, FontAwesome.WARNING);
    UI.getCurrent().addWindow(confirmDialog.getWindow());

    confirmDialog.getWindow().bringToFront();
}

From source file:org.jumpmind.metl.ui.common.TopBar.java

License:Open Source License

public TopBar(ViewManager vm, ApplicationContext context) {
    setWidth(100, Unit.PERCENTAGE);//from   w ww  .j  a  va  2 s .c o  m
    this.context = context;
    this.viewManager = vm;
    this.viewManager.addViewChangeListener(this);

    viewToButtonMapping = new HashMap<String, MenuItem>();

    menuBar = new MenuBar();
    menuBar.setWidth(100, Unit.PERCENTAGE);
    addComponent(menuBar);
    setExpandRatio(menuBar, 1.0f);

    String systemText = getGlobalSetting(GlobalSetting.SYSTEM_TEXT, "").getValue();
    if (isNotBlank(systemText)) {
        Button systemLabel = new Button(systemText, FontAwesome.WARNING);
        systemLabel.setHtmlContentAllowed(true);
        addComponent(systemLabel);
    }

    Button helpButton = new Button("Help", FontAwesome.QUESTION_CIRCLE);
    helpButton.addClickListener(event -> openHelp(event));
    addComponent(helpButton);

    Button settingsButton = new Button(context.getUser().getLoginId(), FontAwesome.GEAR);
    settingsButton.addClickListener((event) -> {
    });
    addComponent(settingsButton);

    Button logoutButton = new Button("Logout", FontAwesome.SIGN_OUT);
    logoutButton.addClickListener(event -> logout());
    addComponent(logoutButton);

    Map<Category, List<TopBarLink>> menuItemsByCategory = viewManager.getMenuItemsByCategory();
    Set<Category> categories = menuItemsByCategory.keySet();
    for (Category category : categories) {
        if (!context.getUser().hasPrivilege(category.name())) {
            log.info("'{}' does not have access to the {} menu tab", context.getUser(), category.name());
            continue;
        }
        List<TopBarLink> links = menuItemsByCategory.get(category);
        boolean needDefaultView = viewManager.getDefaultView() == null && links.size() > 0;
        MenuItem categoryItem = null;
        if (links.size() > 1) {
            categoryItem = menuBar.addItem(category.name(), null);
            categoryItems.add(categoryItem);
        }

        if (needDefaultView) {
            viewManager.setDefaultView(links.get(0).id());
        }

        for (final TopBarLink menuLink : links) {
            Command command = new Command() {

                private static final long serialVersionUID = 1L;

                @Override
                public void menuSelected(MenuItem selectedItem) {
                    uncheckAll();
                    selectedItem.setChecked(true);
                    viewManager.navigateTo(menuLink.id());
                }
            };
            MenuItem menuItem = null;
            if (categoryItem == null) {
                menuItem = menuBar.addItem(menuLink.name(), command);
            } else {
                menuItem = categoryItem.addItem(menuLink.name(), command);
            }
            menuItem.setCheckable(true);
            viewToButtonMapping.put(menuLink.id(), menuItem);
        }
    }
    viewManager.navigateTo(viewManager.getDefaultView());
}

From source file:org.jumpmind.metl.ui.views.manage.ExecutionRunPanel.java

License:Open Source License

protected void refreshUI(ExecutionData data) {
    if (!lastDataRefreshWasDone) {
        flowLabel.setValue(data.execution.getFlowName());
        startLabel.setValue(formatDate(data.execution.getStartTime()));
        if (data.execution.getStatus() != null) {
            if (data.execution.getStatus().equals(ExecutionStatus.ERROR.name())) {
                statusLabel.setStyleName("error");
                statusLabel.setValue(FontAwesome.WARNING.getHtml() + " " + data.execution.getStatus());
            } else if (data.execution.getStatus().equals(ExecutionStatus.DONE.name())) {
                statusLabel.setStyleName("done");
                statusLabel.setValue(FontAwesome.CHECK.getHtml() + " " + data.execution.getStatus());
            } else if (data.execution.getStatus().equals(ExecutionStatus.RUNNING.name())) {
                statusLabel.setStyleName("running");
                statusLabel.setValue(FontAwesome.SPINNER.getHtml() + " " + data.execution.getStatus());
            } else {
                statusLabel.setStyleName("");
                statusLabel.setValue(data.execution.getStatus());
            }/* ww w.  j a  va  2  s  . c  o  m*/
        }
        endLabel.setValue(formatDate(data.execution.getEndTime()));

        if (showDiagramCheckbox.getValue()) {
            redrawFlow();
        }

        @SuppressWarnings("unchecked")
        Set<String> selected = (Set<String>) stepTable.getValue();
        stepContainer.removeAllItems();
        stepContainer.addAll(data.steps);
        if (selected != null && selected.size() > 0) {
            stepTable.setValue(selected);
        } else if (data.steps.size() > 0) {
            selected = new HashSet<>();
            selected.add(data.steps.get(0).getId());
            stepTable.setValue(selected);
        }

        List<ExecutionStepLog> logMessages = new ArrayList<>(logContainer.getItemIds());

        List<ExecutionStepLog> newLogMessages = new ArrayList<>(data.logs);

        for (ExecutionStepLog logMsg : logMessages) {
            newLogMessages.remove(logMsg);
        }

        if (newLogMessages.size() > 0) {
            logContainer.addAll(newLogMessages);
            if (lastSortOrder != null) {
                logTable.setSortOrder(lastSortOrder);
            }
        }
    }

    rerunButton.setVisible(isDone() && flowRunnable != null);
    removeButton.setVisible(isDone());
    cancelButton.setVisible(!isDone());

    lastDataRefreshWasDone = isDone();
}

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");
            }// ww w.j  av a 2 s.  c  om

            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);
}