Example usage for com.vaadin.server FontAwesome STOP

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

Introduction

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

Prototype

FontAwesome STOP

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

Click Source Link

Usage

From source file:com.hybridbpm.ui.component.bpm.CaseLayout.java

License:Apache License

public CaseLayout(String caseId) {
    this.caseId = caseId;

    Responsive.makeResponsive(this);
    btnDelete.setIcon(FontAwesome.TIMES);
    btnTerminate.setIcon(FontAwesome.STOP);
    btnTerminate.setStyleName(ValoTheme.BUTTON_PRIMARY);

    buttonBar.setWidth(100, Unit.PERCENTAGE);
    buttonBar.setSpacing(true);//from  w  w  w  .  j  a  v  a 2s  . c o  m
    buttonBar.addStyleName("toolbar");
    buttonBar.setExpandRatio(btnDelete, 1f);
    buttonBar.setComponentAlignment(btnDelete, Alignment.MIDDLE_RIGHT);
    buttonBar.setComponentAlignment(btnTerminate, Alignment.MIDDLE_RIGHT);

    tabSheet.setStyleName(ValoTheme.TABSHEET_FRAMED);
    tabSheet.setSizeFull();

    setSizeFull();
    setSpacing(true);
    addComponent(caseFormHeader);
    addComponent(tabSheet);
    addComponent(buttonBar);
    setExpandRatio(tabSheet, 1f);

    loadForm();
}

From source file:org.jumpmind.vaadin.ui.sqlexplorer.QueryPanel.java

License:Open Source License

public void addResultsTab(Component resultComponent, String title, Resource icon, int position) {
    Tab tab = resultsTabs.addTab(resultComponent, title, icon, position);

    tab.setClosable(true);//from   ww w.ja va 2  s  .com

    resultsTabs.setSelectedTab(tab.getComponent());

    if (errorTab != null) {
        resultsTabs.removeTab(errorTab);
        errorTab = null;
    }

    if (maxNumberOfResultTabs > 0 && resultsTabs.getComponentCount() > maxNumberOfResultTabs) {
        resultsTabs.removeTab(resultsTabs.getTab(resultsTabs.getComponentCount() - 1));
    }

    if (icon == FontAwesome.STOP) {
        errorTab = tab;
    }
}

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");
            }// www  .  java  2s .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);
}

From source file:org.lucidj.smartbox_renderer.SmartBoxRenderer.java

License:Apache License

private void init_toolbar() {
    cell_toolbar = new CssLayout();

    CssLayout group = new CssLayout();
    group.addStyleName("v-component-group");
    group.addStyleName("ui-toolbar-spacer");

    Button run = new Button();
    run.setHtmlContentAllowed(true);//from  w  ww.j  a va2s .c  om
    String ico3 = "<path class=\"path1\" d=\"M192 128l640 384-640 384z\"></path>";
    run.setCaption(
            "<svg style=\"fill: currentColor; width: 1.5em; margin-top:0.3em;\" viewBox=\"0 0 1024 1024\">"
                    + ico3 + "</svg>");
    run.addStyleName("tiny");
    group.addComponent(run);

    run.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            source.fireEvent(this, "run");
        }
    });

    run.addShortcutListener(new ShortcutListener("Run", ShortcutAction.KeyCode.ENTER,
            new int[] { ShortcutAction.ModifierKey.CTRL }) {
        @Override
        public void handleAction(Object sender, Object target) {
            // The shortcuts (while active on toolbar) are global, however for
            // Ctrl+Enter this becomes counter-intuitive. This way, we filter
            // it to avoid running things from outside the edition field.
            if (target == commands) {
                source.fireEvent(this, "run");
            }
        }
    });

    Button stop = new Button();
    stop.setIcon(FontAwesome.STOP);
    stop.addStyleName("tiny");
    group.addComponent(stop);

    stop.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            source.fireEvent(this, "stop");
        }
    });

    cell_toolbar.addComponent(group);
}