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:com.hybridbpm.ui.component.dashboard.panel.AddRowButton.java

License:Apache License

public AddRowButton(Button.ClickListener clickListener) {
    addClickListener(clickListener);// w w  w .  j  a  v  a2  s.  c  o m
    setIcon(FontAwesome.PLUS_CIRCLE);
    setStyleName(ValoTheme.BUTTON_LINK);
    addStyleName(ValoTheme.BUTTON_TINY);
    setDescription("Add row");
}

From source file:com.hybridbpm.ui.component.development.DataEditor.java

License:Apache License

private void prepareModeler() {
    btnAdd.setCaption("Add field");
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.addStyleName(ValoTheme.BUTTON_SMALL);

    modelerLayout.setMargin(true);//from  w ww .j a v a 2  s. c om
    modelerLayout.setSpacing(true);
    modelerLayout.setWidth(100, Sizeable.Unit.PERCENTAGE);
    for (FieldModel fieldModel : dataModel.getFields()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        modelerLayout.addComponent(fieldForm);
    }
    modelerLayout.addComponent(btnAdd);
    modelerLayout.setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}

From source file:com.hybridbpm.ui.component.development.InParametersLayout.java

License:Apache License

public void initUI() {
    removeAllComponents();/* ww w  .ja v  a  2 s . com*/
    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 : connectoModel.getInParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}

From source file:com.hybridbpm.ui.component.development.OutParametersLayout.java

License:Apache License

public void initUI() {
    removeAllComponents();/*  w  ww  .  j  a  v  a2  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 : connectoModel.getOutParameters()) {
        FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
        fieldForm.setFieldModel(fieldModel);
        addComponent(fieldForm);
    }
    addComponent(btnAdd);
    setComponentAlignment(btnAdd, Alignment.MIDDLE_RIGHT);
}

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

License:Apache License

public TranslatedField() {
    form.setSpacing(true);/*  w w  w  .ja  v a  2s. com*/
    form.setMargin(false);
    form.addStyleName(ValoTheme.LAYOUT_CARD);
    form.addStyleName("transacted-field");

    btnAdd.addStyleName(ValoTheme.BUTTON_LINK);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    form.addComponent(btnAdd);
}

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

License:Apache License

public ValoMenuAddViewButton() {
    setPrimaryStyleName("valo-menu-item");
    addStyleName("valo-add-menu-item");
    setIcon(FontAwesome.PLUS_CIRCLE);
    setDescription("Add new view");
    addClickListener(new ClickListener() {
        @Override/*  w ww .j  a v a 2 s  .c  o m*/
        public void buttonClick(ClickEvent event) {
            ViewManager.editViewDefinitionWindow(null);
        }
    });
}

From source file:com.hybridbpm.ui.view.DashboardView.java

License:Apache License

public DashboardView(ViewDefinition vd) {
    this.viewDefinition = HybridbpmUI.getDashboardAPI().getViewDefinitionById(vd.getId().toString());
    Design.read(this);
    Responsive.makeResponsive(this);

    btnAdd.addClickListener(this);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.setCaption("Add tab");

    btnEdit.addClickListener(this);
    btnEdit.setIcon(FontAwesome.EDIT);//from  w w w .ja v  a 2 s  .c om
    btnEdit.setCaption("Edit view");

    btnDelete.addClickListener(this);
    btnDelete.setIcon(FontAwesome.TIMES_CIRCLE);
    btnDelete.setCaption("Delete view");

    createTabs();
    checkDeveloperMode();

    tabSheet.addSelectedTabChangeListener(this);
    tabSheet.setCloseHandler(this);
}

From source file:com.hybridbpm.ui.view.DevelopmentView.java

License:Apache License

public DevelopmentView() {
    Design.read(this);
    Responsive.makeResponsive(panelLayout);

    moduleType.addContainerProperty("NAME", String.class, null);
    moduleType.addItem(Boolean.FALSE).getItemProperty("NAME").setValue("Module");
    moduleType.addItem(Boolean.TRUE).getItemProperty("NAME").setValue("Template");
    moduleType.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY);
    moduleType.setItemCaptionPropertyId("NAME");
    moduleType.setValue(Boolean.FALSE);
    moduleType.addValueChangeListener(this);

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

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

    btnExport.setIcon(FontAwesome.CLOUD_UPLOAD);
    btnExport.addClickListener(this);

    btnImport.setIcon(FontAwesome.CLOUD_DOWNLOAD);
    btnImport.addClickListener(this);

    btnRegenerate.setIcon(FontAwesome.WRENCH);
    btnRegenerate.addClickListener(this);

    modulesLayout.setMargin(new MarginInfo(true, false, false, false));
    modulesLayout.setExpandRatio(modulesTable, 1f);

    modulesTable.addContainerProperty("title", Component.class, null, "Title", null, Table.Align.LEFT);
    modulesTable.setColumnExpandRatio("title", 1f);
    modulesTable.addContainerProperty("updateDate", Date.class, null, "Update Date", null, Table.Align.LEFT);
    modulesTable.addContainerProperty("actions", TableButtonBar.class, null, "Actions", null, Table.Align.LEFT);
    modulesTable.setColumnWidth("updateDate", 150);
    modulesTable.setColumnWidth("actions", 80);
    modulesTable.addGeneratedColumn("updateDate", new DateColumnGenerator());
    modulesTable.setVisibleColumns("title", "updateDate", "actions");
}

From source file:com.mcparland.john.vaadin_mvn_arch.samples.crud.SampleCrudView.java

License:Apache License

public HorizontalLayout createTopBar() {
    TextField filter = new TextField();
    filter.setStyleName("filter-textfield");
    filter.setInputPrompt("Filter");
    ResetButtonForTextField.extend(filter);
    filter.setImmediate(true);//from   w w w .j  a v a  2  s.  c  o  m
    filter.addTextChangeListener(new FieldEvents.TextChangeListener() {
        /**
         * The serialVersionUID.
         */
        private static final long serialVersionUID = 1L;

        @Override
        public void textChange(FieldEvents.TextChangeEvent event) {
            table.setFilter(event.getText());
        }
    });

    newProduct = new Button("New product");
    newProduct.addStyleName(ValoTheme.BUTTON_PRIMARY);
    newProduct.setIcon(FontAwesome.PLUS_CIRCLE);
    newProduct.addClickListener(new ClickListener() {
        /**
         * The serialVersionUID.
         */
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            viewLogic.newProduct();
        }
    });

    HorizontalLayout topLayout = new HorizontalLayout();
    topLayout.setSpacing(true);
    topLayout.setWidth("100%");
    topLayout.addComponent(filter);
    topLayout.addComponent(newProduct);
    topLayout.setComponentAlignment(filter, Alignment.MIDDLE_LEFT);
    topLayout.setExpandRatio(filter, 1);
    topLayout.setStyleName("top-bar");
    return topLayout;
}

From source file:com.mycollab.module.crm.view.CrmModule.java

License:Open Source License

@Override
public MHorizontalLayout buildMenu() {
    if (serviceMenuContainer == null) {
        serviceMenuContainer = new MHorizontalLayout();
        serviceMenu = new ServiceMenu();
        serviceMenu.addService(CrmTypeConstants.DASHBOARD,
                UserUIContext.getMessage(CrmCommonI18nEnum.TOOLBAR_DASHBOARD_HEADER),
                clickEvent -> EventBusFactory.getInstance().post(new CrmEvent.GotoHome(this, null)));

        serviceMenu.addService(CrmTypeConstants.ACCOUNT, UserUIContext.getMessage(AccountI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new AccountEvent.GotoList(this, null)));

        serviceMenu.addService(CrmTypeConstants.CONTACT, UserUIContext.getMessage(ContactI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new ContactEvent.GotoList(this, null)));

        serviceMenu.addService(CrmTypeConstants.LEAD, UserUIContext.getMessage(LeadI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new LeadEvent.GotoList(this, null)));

        serviceMenu.addService(CrmTypeConstants.CAMPAIGN, UserUIContext.getMessage(CampaignI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new CampaignEvent.GotoList(this, null)));

        serviceMenu.addService(CrmTypeConstants.OPPORTUNITY, UserUIContext.getMessage(OpportunityI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new OpportunityEvent.GotoList(this, null)));

        serviceMenu.addService(CrmTypeConstants.CASE, UserUIContext.getMessage(CaseI18nEnum.LIST),
                clickEvent -> EventBusFactory.getInstance().post(new CaseEvent.GotoList(this, null)));

        serviceMenuContainer.with(serviceMenu);

        Button.ClickListener listener = new CreateItemListener();

        addPopupMenu = new PopupButton(UserUIContext.getMessage(GenericI18Enum.ACTION_NEW));
        addPopupMenu.setIcon(FontAwesome.PLUS_CIRCLE);
        addPopupMenu.addStyleName("add-btn-popup");
        addPopupMenu.setDirection(Alignment.BOTTOM_LEFT);
        OptionPopupContent popupButtonsControl = new OptionPopupContent();

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_ACCOUNT)) {
            Button newAccountBtn = new Button(UserUIContext.getMessage(AccountI18nEnum.SINGLE), listener);
            newAccountBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.ACCOUNT));
            popupButtonsControl.addOption(newAccountBtn);
        }/*from ww  w . ja  v  a  2 s  .c  om*/

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_CONTACT)) {
            Button newContactBtn = new Button(UserUIContext.getMessage(ContactI18nEnum.SINGLE), listener);
            newContactBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CONTACT));
            popupButtonsControl.addOption(newContactBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_CAMPAIGN)) {
            Button newCampaignBtn = new Button(UserUIContext.getMessage(CampaignI18nEnum.SINGLE), listener);
            newCampaignBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CAMPAIGN));
            popupButtonsControl.addOption(newCampaignBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_OPPORTUNITY)) {
            Button newOpportunityBtn = new Button(UserUIContext.getMessage(OpportunityI18nEnum.SINGLE),
                    listener);
            newOpportunityBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.OPPORTUNITY));
            popupButtonsControl.addOption(newOpportunityBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_LEAD)) {
            Button newLeadBtn = new Button(UserUIContext.getMessage(LeadI18nEnum.SINGLE), listener);
            newLeadBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.LEAD));
            popupButtonsControl.addOption(newLeadBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_CASE)) {
            Button newCaseBtn = new Button(UserUIContext.getMessage(CaseI18nEnum.SINGLE), listener);
            newCaseBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CASE));
            popupButtonsControl.addOption(newCaseBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_TASK)) {
            Button newTaskBtn = new Button(UserUIContext.getMessage(TaskI18nEnum.SINGLE), listener);
            newTaskBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.TASK));
            popupButtonsControl.addOption(newTaskBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_CALL)) {
            Button newCallBtn = new Button(UserUIContext.getMessage(CallI18nEnum.SINGLE), listener);
            newCallBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CALL));
            popupButtonsControl.addOption(newCallBtn);
        }

        if (UserUIContext.canWrite(RolePermissionCollections.CRM_MEETING)) {
            Button newMeetingBtn = new Button(UserUIContext.getMessage(MeetingI18nEnum.SINGLE), listener);
            newMeetingBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.MEETING));
            popupButtonsControl.addOption(newMeetingBtn);
        }

        if (popupButtonsControl.getComponentCount() > 0) {
            addPopupMenu.setContent(popupButtonsControl);
            serviceMenuContainer.with(addPopupMenu).withAlign(addPopupMenu, Alignment.MIDDLE_LEFT);
        }
    }
    return serviceMenuContainer;
}