Example usage for com.vaadin.server FontAwesome PLUS_CIRCLE

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

Introduction

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

Prototype

FontAwesome PLUS_CIRCLE

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

Click Source Link

Usage

From source file:ch.wscr.management.ui.view.MemberView.java

/**
 * Kopfzeile fr das Grid erstellen//from  ww w .  j  a va  2 s . c o  m
 *
 * @param grid das Grid dem die Kopfzeile hinzugefgt werden soll
 */
private void setHeaderRow(final Grid grid) {
    // TODO Erstellung neuer Mitglieder muss noch optimiert werden

    final Button addMember = new Button("Neu", clickEvent -> {
        BeanItem<Member> beanItem = memberBeanItemContainer.addItem(new Member());
        grid.setEditorEnabled(true);
        //grid.editItem(beanItem);

    });

    addMember.setStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED);
    addMember.setIcon(FontAwesome.PLUS_CIRCLE);

    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSizeFull();
    buttonLayout.setSpacing(true);
    buttonLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    buttonLayout.addComponent(addMember);

    HeaderRow headerRow = grid.prependHeaderRow();
    headerRow.join("memberId", "lastName", "firstName", "adrStreet", "adrPostalCode", "adrCity", "adrCountry",
            "birthDate", "driverLicense");
    headerRow.getCell("lastName").setComponent(buttonLayout);
}

From source file:com.esofthead.mycollab.module.project.ui.components.TagViewComponent.java

License:Open Source License

private Button createAddTagBtn() {
    final Button addTagBtn = new Button("Add tag", FontAwesome.PLUS_CIRCLE);
    addTagBtn.addClickListener(new Button.ClickListener() {
        @Override//w ww  .  j ava 2 s. c o m
        public void buttonClick(Button.ClickEvent clickEvent) {
            TagViewComponent.this.removeComponent(addTagBtn);
            TagViewComponent.this.addComponent(createSaveTagComp());
        }
    });
    addTagBtn.setStyleName("link");
    return addTagBtn;
}

From source file:com.esofthead.mycollab.module.project.view.ProjectModule.java

License:Open Source License

@Override
public MHorizontalLayout buildMenu() {
    if (serviceMenuContainer == null) {
        serviceMenuContainer = new MHorizontalLayout();
        final ServiceMenu serviceMenu = new ServiceMenu();
        serviceMenu.addService(AppContext.getMessage(ProjectI18nEnum.LIST), new Button.ClickListener() {
            @Override/*from w w w .  j av a  2  s  . co m*/
            public void buttonClick(Button.ClickEvent clickEvent) {
                EventBusFactory.getInstance().post(new ProjectEvent.GotoUserDashboard(this, null));
                serviceMenu.selectService(0);
            }
        });
        serviceMenu.selectService(0);

        if (!SiteConfiguration.isCommunityEdition()) {
            serviceMenu.addService(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_CLIENTS),
                    new Button.ClickListener() {
                        @Override
                        public void buttonClick(Button.ClickEvent clickEvent) {
                            EventBusFactory.getInstance().post(new ClientEvent.GotoList(this, null));
                            serviceMenu.selectService(1);
                        }
                    });

            serviceMenu.addService(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_REPORTS),
                    new Button.ClickListener() {
                        @Override
                        public void buttonClick(Button.ClickEvent clickEvent) {
                            EventBusFactory.getInstance().post(new ReportEvent.GotoConsole(this));
                            serviceMenu.selectService(2);
                        }
                    });
        }

        serviceMenuContainer.with(serviceMenu);

        Button newPrjBtn = new Button(AppContext.getMessage(ProjectI18nEnum.NEW), new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent clickEvent) {
                UI.getCurrent().addWindow(new ProjectAddWindow());
            }
        });
        newPrjBtn.addStyleName("add-btn-popup");
        newPrjBtn.setIcon(FontAwesome.PLUS_CIRCLE);
        newPrjBtn.setEnabled(AppContext.canBeYes(RolePermissionCollections.CREATE_NEW_PROJECT));
        serviceMenuContainer.with(newPrjBtn).withAlign(newPrjBtn, Alignment.MIDDLE_LEFT);

        Button switchPrjBtn = new SwitchProjectPopupButton();
        serviceMenuContainer.with(switchPrjBtn).withAlign(switchPrjBtn, Alignment.MIDDLE_LEFT);
    }

    return serviceMenuContainer;
}

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

License:Apache License

public AbstractTabLayout() {
    Design.read(this);
    Responsive.makeResponsive(this);

    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.addClickListener(this);

    btnRefresh.setIcon(FontAwesome.REFRESH);
    btnRefresh.addClickListener(this);

    prepareUI();//from   w ww .  j a va  2  s .c  o  m
}

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

License:Apache License

public AbstractTableLayout() {
    Design.read(this);
    Responsive.makeResponsive(this);

    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.addClickListener(this);

    btnRefresh.setIcon(FontAwesome.REFRESH);
    btnRefresh.addClickListener(this);

    setExpandRatio(iTable, 1f);//w  ww.  ja  v a 2 s  .c o m
    prepareTable();
}

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

License:Apache License

public AbstractTreeTableLayout() {
    Design.read(this);
    Responsive.makeResponsive(this);

    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.addClickListener(this);

    btnRefresh.setIcon(FontAwesome.REFRESH);
    btnRefresh.addClickListener(this);

    setExpandRatio(iTable, 1f);// w w w.j a  v  a  2  s . c  o  m
    prepareTable();
}

From source file:com.hybridbpm.ui.component.bpm.designer.FileEditorLayout.java

License:Apache License

public void initUI() {
    removeAllComponents();/* w ww . j a  v  a  2  s.  co m*/
    btnAdd.setCaption(("Add file"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FileModel fileModel : processModel.getFileModels()) {
        FileForm fileForm = new FileForm();
        fileForm.setFileModel(fileModel);
        addComponent(fileForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}

From source file:com.hybridbpm.ui.component.bpm.designer.ParametersLayout.java

License:Apache License

public void initUI(boolean editable) {
    removeAllComponents();/*from www  .ja va 2 s. c  o m*/
    btnAdd.setCaption(("Add parameter"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : formModel.getParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        fieldForm.setEnabled(editable);
        fieldForm.setReadOnly(!editable);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
    btnAdd.setVisible(editable);
}

From source file:com.hybridbpm.ui.component.bpm.designer.VariableEditorLayout.java

License:Apache License

public void initUI() {
    removeAllComponents();/*  w w  w .j  a  v  a2 s.  c  om*/
    btnAdd.setCaption(("Add variable"));
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    setMargin(true);
    setSpacing(true);
    setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : processModel.getVariableModels()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.COMPLEX_DATA);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}

From source file:com.hybridbpm.ui.component.dashboard.panel.AddColumnButton.java

License:Apache License

public AddColumnButton(Button.ClickListener clickListener) {
    addClickListener(clickListener);/*from www.j  ava2  s .  c  o  m*/
    setIcon(FontAwesome.PLUS_CIRCLE);
    setStyleName(ValoTheme.BUTTON_LINK);
    addStyleName(ValoTheme.BUTTON_TINY);
    setDescription("Add column");
}