Example usage for com.vaadin.server FontAwesome TIMES

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

Introduction

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

Prototype

FontAwesome TIMES

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

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);//w w w .  j a v  a 2  s.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:com.hybridbpm.ui.component.bpm.designer.ProcessModelLayout.java

License:Apache License

private void prepareButtonsBars() {
    // element button bar
    btnEdit.addStyleName(ValoTheme.BUTTON_LINK);
    btnEdit.addStyleName(ValoTheme.BUTTON_SMALL);
    btnEdit.addStyleName("edit-button");
    btnEdit.setIcon(FontAwesome.PENCIL_SQUARE);

    btnDelete.addStyleName(ValoTheme.BUTTON_LINK);
    btnDelete.addStyleName(ValoTheme.BUTTON_SMALL);
    btnDelete.addStyleName("edit-button");
    btnDelete.setIcon(FontAwesome.TIMES);

    elementButtonBar.addComponent(btnEdit);
    elementButtonBar.addComponent(btnDelete);
    elementButtonBar.setId("button-bar");

    // width button bar
    btnRight.setIcon(FontAwesome.ARROW_CIRCLE_RIGHT);
    btnRight.addStyleName(ValoTheme.BUTTON_LINK);

    btnLeft.setIcon(FontAwesome.ARROW_CIRCLE_LEFT);
    btnLeft.addStyleName(ValoTheme.BUTTON_LINK);

    widthButtonBar.addComponent(btnRight);
    widthButtonBar.addComponent(btnLeft);
    widthButtonBar.addStyleName("width-button-bar");
    widthButtonBar.setWidthUndefined();//from   w  w w.j  a  v a2s . com
    addComponent(widthButtonBar);

    // height button bar
    btnUp.setIcon(FontAwesome.ARROW_CIRCLE_UP);
    btnUp.addStyleName(ValoTheme.BUTTON_LINK);

    btnDown.setIcon(FontAwesome.ARROW_CIRCLE_DOWN);
    btnDown.addStyleName(ValoTheme.BUTTON_LINK);

    heightButtonBar.addComponent(btnUp);
    heightButtonBar.addComponent(btnDown);
    heightButtonBar.addStyleName("height-button-bar");
    addComponent(heightButtonBar);
}

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

License:Apache License

private void configureVisibilityAndAccess() {
    if (hCase == null) {
        btnAccept.setVisible(false);/*from w w w.  j a va  2s . c o m*/
        btnSave.setVisible(false);
        btnEscalate.setVisible(false);
        btnSchedule.setVisible(false);
        btnDelegate.setVisible(false);
        priorityMenubar.setVisible(false);
    } else {
        priorityItem.setText(task.getTaskPriority() != null ? task.getTaskPriority().name()
                : TaskModel.TASK_PRIORITY.NORMAL.name());
        priorityItem.setIcon(task.getTaskPriority() != null && task.getTaskPriority().getIcon() != null
                ? FontAwesome.valueOf(task.getTaskPriority().getIcon())
                : null);
        if (task.getExecutor() == null) {
            priorityMenubar.setEnabled(false);
            btnAccept.setIcon(FontAwesome.CHECK);
            btnAccept.setCaption("Accept");
            btnAccept.setEnabled(true);
            btnEscalate.setEnabled(false);
            btnDelegate.setEnabled(false);
            btnSchedule.setEnabled(false);
            btnSave.setEnabled(false);
            btnSend.setEnabled(false);
            tabSheet.setReadOnly(true);
            tabSheet.setEnabled(false);
        } else if (task.getExecutor().equals(HybridbpmUI.getUser().getUsername())) {
            priorityMenubar.setEnabled(true);
            btnAccept.setIcon(FontAwesome.TIMES);
            btnAccept.setCaption("Deny");
            btnAccept.setEnabled(true);
            btnEscalate.setEnabled(true);
            btnSchedule.setEnabled(true);
            btnDelegate.setEnabled(true);
            btnSave.setEnabled(true);
            btnSend.setEnabled(true);
            tabSheet.setReadOnly(false);
            tabSheet.setEnabled(true);
        }
    }
    // for other statuses than TODO
    if (!Objects.equals(task.getStatus(), TaskModel.STATUS.TODO)) {
        btnAccept.setVisible(false);
        btnSave.setVisible(false);
        btnSend.setVisible(false);
        btnEscalate.setVisible(false);
        btnSchedule.setVisible(false);
        btnDelegate.setVisible(false);
        priorityMenubar.setVisible(false);
        for (Component comp : tabSheet) {
            comp.setReadOnly(true);
            comp.setEnabled(false);
        }
    }
}

From source file:com.hybridbpm.ui.component.chart.color.GaugeBandLayout.java

License:Apache License

public GaugeBandLayout(final BeanFieldGroup<DiagrammePreference> preferences) {
    super(preferences);

    setCaption("Gauge Band Colors");
    setSizeFull();//from   w  ww  . j ava 2s .  c  o m
    setSpacing(true);
    setMargin(false);

    addBandButton.setIcon(FontAwesome.PLUS);
    addBandButton.setStyleName(ValoTheme.BUTTON_BORDERLESS);
    addBandButton.addStyleName(ValoTheme.BUTTON_SMALL);

    bandAdditionButtonFrame.setSpacing(true);
    bandAdditionButtonFrame.addComponent(addBandButton);
    bandAdditionButtonFrame.setComponentAlignment(addBandButton, Alignment.MIDDLE_RIGHT);

    addComponent(bandAdditionButtonFrame);

    addBandButton.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {
            addBand();
        }
    });

    colorTable.setHeight("100%");
    colorTable.setWidth("100%");
    colorTable.addStyleName(ValoTheme.TABLE_COMPACT);
    colorTable.addStyleName(ValoTheme.TABLE_SMALL);
    colorTable.addStyleName("color-table");

    colorTable.addContainerProperty(Translate.getMessage("colour"), ColorPicker.class, null);
    colorTable.addContainerProperty(Translate.getMessage("start"), TextField.class, null);
    colorTable.addContainerProperty(Translate.getMessage("end"), TextField.class, null);
    colorTable.addContainerProperty("remove", Button.class, null);

    // COLOR COLUMN
    colorTable.addGeneratedColumn(Translate.getMessage("colour"), new Table.ColumnGenerator() {
        @Override
        public Object generateCell(Table source, Object itemId, Object columnId) {
            final Property<String> colorProp = tableContainer.getItem(itemId).getItemProperty("color");

            int[] col = ColourUtil.decode(colorProp.getValue());
            ColorPicker picker = new ColorPicker();
            picker.addStyleName("diagramme");
            picker.setPosition(Page.getCurrent().getBrowserWindowWidth() / 2 - 246 / 2,
                    Page.getCurrent().getBrowserWindowHeight() / 2 - 507 / 2);
            picker.setColor(new com.vaadin.shared.ui.colorpicker.Color(col[0], col[1], col[2]));

            picker.addColorChangeListener(new ColorChangeListener() {
                @Override
                public void colorChanged(ColorChangeEvent event) {
                    colorProp.setValue(event.getColor().getCSS());
                    updateDiagramme();
                }
            });
            picker.setWidth("25px");

            return picker;
        }
    });

    // BAND START COLUMN
    colorTable.addGeneratedColumn(Translate.getMessage("start"), new Table.ColumnGenerator() {
        @Override
        public Object generateCell(Table source, Object itemId, Object columnId) {
            final Property<Double> startProp = tableContainer.getContainerProperty(itemId, "startValue");

            final ObjectProperty<Double> startValue = new ObjectProperty<Double>(0.0);
            TextField startField = new TextField(startValue);
            //startField.setWidth("60px");
            startField.setSizeFull();
            startField.setNullRepresentation("0");
            startField.addStyleName("tfwb");
            startField.setConvertedValue(startProp.getValue());
            startField.setImmediate(true);

            startValue.addValueChangeListener(new Property.ValueChangeListener() {
                @Override
                public void valueChange(Property.ValueChangeEvent event) {
                    startProp.setValue((Double) event.getProperty().getValue());
                    updateDiagramme();
                }
            });

            return startField;
        }
    });

    // BAND END COLUMN
    colorTable.addGeneratedColumn(Translate.getMessage("end"), new Table.ColumnGenerator() {
        @Override
        public Object generateCell(Table source, Object itemId, Object columnId) {
            final Property<Double> endProp = tableContainer.getContainerProperty(itemId, "endValue");

            final ObjectProperty<Double> endValue = new ObjectProperty<Double>(0.0);
            TextField endField = new TextField(endValue);
            //endField.setWidth("60px");
            endField.setSizeFull();
            endField.setNullRepresentation("0");
            endField.addStyleName("tfwb");
            endField.setConvertedValue(endProp.getValue());
            endField.setImmediate(true);

            endValue.addValueChangeListener(new Property.ValueChangeListener() {
                @Override
                public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
                    endProp.setValue((Double) valueChangeEvent.getProperty().getValue());
                    updateDiagramme();
                }
            });

            return endField;
        }
    });

    // DELETE BAND COLUMN
    colorTable.addGeneratedColumn("remove", new Table.ColumnGenerator() {

        @Override
        public Object generateCell(Table source, final Object itemId, Object columnId) {

            Button delete = new Button(FontAwesome.TIMES);
            delete.addClickListener(new Button.ClickListener() {
                @Override
                public void buttonClick(Button.ClickEvent event) {
                    removeBand(itemId);
                }
            });
            delete.setWidth("43px");

            return delete;
        }
    });

    colorTable.setColumnWidth(Translate.getMessage("colour"), 33);
    colorTable.setColumnWidth("remove", 48);
    colorTable.setColumnExpandRatio(Translate.getMessage("start"), 0.5f);
    colorTable.setColumnExpandRatio(Translate.getMessage("end"), 0.5f);

    colorTable.setSortEnabled(false);
    colorTable.setPageLength(0);
    colorTable.setEditable(true);
    colorTable.setImmediate(true);

    addComponent(colorTable);
    setExpandRatio(colorTable, 1f);
    setComponentAlignment(colorTable, Alignment.TOP_LEFT);
}

From source file:com.hybridbpm.ui.component.FileField.java

License:Apache License

public FileField(File file) {
    this.file = file;
    Design.read(this);
    btnDelete.setIcon(FontAwesome.TIMES);
    btnDelete.addClickListener(this);
    demandFileDownloader.extend(btnDownload);
    checkVisibility();//from   w w w . jav a  2 s  .com
}

From source file:com.mycollab.module.crm.view.opportunity.ContactRoleEditViewImpl.java

License:Open Source License

private ComponentContainer createButtonControls() {
    MButton updateBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_UPDATE_LABEL),
            clickEvent -> updateContactRoles()).withIcon(FontAwesome.SAVE)
                    .withStyleName(WebThemes.BUTTON_ACTION);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CANCEL),
            clickEvent -> EventBusFactory.getInstance().post(new ContactEvent.GotoList(this, null)))
                    .withIcon(FontAwesome.TIMES).withStyleName(WebThemes.BUTTON_OPTION);

    return new MHorizontalLayout(cancelBtn, updateBtn);
}

From source file:com.mycollab.module.project.view.settings.component.InviteUserTokenField.java

License:Open Source License

private Component generateToken(final String email) {
    final Button btn = new Button(email, FontAwesome.TIMES);
    btn.addClickListener(clickEvent -> {
        InviteUserTokenField.this.removeComponent(btn);
        inviteEmails.remove(email);// w  w  w.jav  a  2 s . c  o m
    });
    btn.addStyleName("token-field");
    return btn;
}

From source file:com.mycollab.module.project.view.settings.component.InviteUserTokenField.java

License:Open Source License

private Component generateToken(final SimpleUser user) {
    final Button btn = new Button("", FontAwesome.TIMES);
    btn.setCaptionAsHtml(true);// ww  w  .  j a  v a  2 s .c o  m
    btn.setCaption((new Img("", StorageFactory.getAvatarPath(user.getAvatarid(), 16))).write() + " "
            + user.getDisplayName());
    btn.addClickListener(clickEvent -> {
        InviteUserTokenField.this.removeComponent(btn);
        inviteEmails.remove(user.getEmail());
    });
    btn.setStyleName("token-field");
    return btn;
}

From source file:com.mycollab.vaadin.web.ui.VerticalTabsheet.java

License:Open Source License

public void setNavigatorVisibility(boolean visibility) {
    if (!visibility) {
        navigatorWrapper.setWidth("65px");
        navigatorContainer.setWidth("65px");
        this.hideTabsCaption();

        navigatorContainer.setComponentAlignment(toggleBtn, Alignment.MIDDLE_CENTER);
        toggleBtn.setIcon(FontAwesome.ANGLE_DOUBLE_RIGHT);
        toggleBtn.setStyleName(WebThemes.BUTTON_ICON_ONLY + " expand-button");
        toggleBtn.setDescription(UserUIContext.getMessage(ShellI18nEnum.ACTION_EXPAND_MENU));
        toggleBtn.setCaption("");
    } else {//ww w  . j a va  2 s.  com
        navigatorWrapper.setWidth("200px");
        navigatorContainer.setWidth("200px");
        this.showTabsCaption();

        toggleBtn.setStyleName(WebThemes.BUTTON_ICON_ONLY + " closed-button");
        navigatorContainer.setComponentAlignment(toggleBtn, Alignment.TOP_RIGHT);
        toggleBtn.setIcon(FontAwesome.TIMES);
        toggleBtn.setDescription(UserUIContext.getMessage(ShellI18nEnum.ACTION_COLLAPSE_MENU));
    }
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.DataHandler.java

License:Open Source License

/**
 * //from ww  w .ja va 2 s.c o  m
 * @param statusValues
 * @return
 * @deprecated
 */
public VerticalLayout createProjectStatusComponent(Map<String, Integer> statusValues) {
    VerticalLayout projectStatusContent = new VerticalLayout();

    Iterator<Entry<String, Integer>> it = statusValues.entrySet().iterator();
    int finishedExperiments = 0;

    while (it.hasNext()) {
        Map.Entry<String, Integer> pairs = (Map.Entry<String, Integer>) it.next();

        if ((Integer) pairs.getValue() == 0) {
            Label statusLabel = new Label(pairs.getKey() + ": " + FontAwesome.TIMES.getHtml(),
                    ContentMode.HTML);
            statusLabel.addStyleName("redicon");
            projectStatusContent.addComponent(statusLabel);
        }

        else {
            Label statusLabel = new Label(pairs.getKey() + ": " + FontAwesome.CHECK.getHtml(),
                    ContentMode.HTML);
            statusLabel.addStyleName("greenicon");

            if (pairs.getKey().equals("Project Planned")) {
                projectStatusContent.addComponentAsFirst(statusLabel);
            } else {
                projectStatusContent.addComponent(statusLabel);

            }
            finishedExperiments += (Integer) pairs.getValue();
        }
    }
    // ProgressBar progressBar = new ProgressBar();
    // progressBar.setValue((float) finishedExperiments / statusValues.keySet().size());
    // projectStatusContent.addComponent(progressBar);

    return projectStatusContent;
}