Example usage for com.vaadin.server FontAwesome SEARCH

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

Introduction

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

Prototype

FontAwesome SEARCH

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.vaadin.web.ui.DynamicQueryParamLayout.java

License:Open Source License

private HorizontalLayout createButtonControls() {
    MHorizontalLayout buttonControls = new MHorizontalLayout()
            .withMargin(new MarginInfo(false, true, false, true));

    Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override//from  ww w.  j  a  v  a 2  s .c o m
                public void buttonClick(final ClickEvent event) {
                    callSearchAction();
                }
            });
    searchBtn.setStyleName(UIConstants.BUTTON_ACTION);
    searchBtn.setIcon(FontAwesome.SEARCH);

    buttonControls.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_CENTER);

    Button clearBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CLEAR),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    clearFields();
                }
            });
    clearBtn.setStyleName(UIConstants.BUTTON_OPTION);

    buttonControls.with(clearBtn).withAlign(clearBtn, Alignment.MIDDLE_CENTER);

    Button basicSearchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_BASIC_SEARCH),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    ((DefaultGenericSearchPanel<S>) searchPanel).moveToBasicSearchLayout();
                }
            });
    basicSearchBtn.setStyleName(UIConstants.BUTTON_LINK);
    buttonControls.with(basicSearchBtn).withAlign(basicSearchBtn, Alignment.MIDDLE_CENTER);
    return buttonControls;
}

From source file:com.esofthead.mycollab.vaadin.web.ui.SearchTextField.java

License:Open Source License

public SearchTextField() {
    this.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT);
    ELabel icon = ELabel.fontIcon(FontAwesome.SEARCH);
    innerField = new TextField();
    innerField.setImmediate(true);//from  w ww.ja va 2s.c  om
    innerField.setInputPrompt("Search");
    innerField.setWidth("180px");
    this.with(icon, innerField).withStyleName("searchfield");
    ShortcutListener shortcutListener = new ShortcutListener("searchfield", ShortcutAction.KeyCode.ENTER,
            null) {
        @Override
        public void handleAction(Object sender, Object target) {
            String value = ((TextField) target).getValue();
            if (isNotBlank(value)) {
                doSearch(value);
            } else {
                emptySearch();
            }
        }
    };
    ShortcutExtension.installShortcutAction(innerField, shortcutListener);
}

From source file:com.etest.view.systemadministration.SemestralTeamUI.java

FormLayout buildForms() {
    FormLayout form = new FormLayout();
    form.setWidth("400px");
    form.setSpacing(true);/* www.  j a v a  2 s .  c  o  m*/

    subjects = CommonComboBox.getSubjectFromCurriculum("Subject..");
    subjects.setCaption("Curriculum: ");
    subjects.setIcon(FontAwesome.SEARCH);
    form.addComponent(subjects);

    schoolYear = CommonComboBox.getSchoolYear("School Year..");
    schoolYear.setCaption("School Year: ");
    schoolYear.setIcon(FontAwesome.SEARCH);
    form.addComponent(schoolYear);

    semester = CommonComboBox.getNormCourseOfferingComboBox("Semester..");
    semester.setCaption("Semester: ");
    semester.setIcon(FontAwesome.SEARCH);
    form.addComponent(semester);

    faculty = CommonComboBox.getAllFaculty("Select Faculty..");
    faculty.setCaption("Team Leader: ");
    faculty.setIcon(FontAwesome.USER);
    form.addComponent(faculty);

    Button saveBtn = new Button("Enroll Semestral Team");
    saveBtn.setWidth("100%");
    saveBtn.setIcon(FontAwesome.SAVE);
    saveBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    saveBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    saveBtn.addClickListener(saveBtnClickListener);
    saveBtn.setImmediate(true);
    form.addComponent(saveBtn);

    return form;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createSearchDocumentViewPageLink() {
    final Link pageLink = new Link(SEARCH,
            new ExternalResource(PAGE_PREFIX + UserViews.SEARCH_DOCUMENT_VIEW_NAME));
    pageLink.setId(ViewAction.VISIT_DOCUMENT_VIEW.name());
    pageLink.setIcon(FontAwesome.SEARCH);

    return pageLink;
}

From source file:com.hris.employee.grid.EmployeeDataGridProperties.java

private void filterDataGrid(IndexedContainer container) {
    // Create a header row to hold column filters
    HeaderRow filterRow = appendHeaderRow();

    // Set up a filter for all columns
    this.getContainerDataSource().getContainerPropertyIds().stream().filter((pid) -> (pid.equals("name")))
            .forEach((pid) -> {//from  w w  w.j  a  v  a2  s  .  c o m
                HeaderCell cell = filterRow.getCell(pid);

                // Have an input field to use for filter
                TextField filterField = new TextField();
                filterField.setWidth("100%");
                filterField.setIcon(FontAwesome.SEARCH);
                filterField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
                filterField.addStyleName(ValoTheme.TEXTFIELD_SMALL);
                filterField.setInputPrompt("Filter");

                filterField.addTextChangeListener(change -> {
                    container.removeContainerFilters(pid);

                    if (!change.getText().isEmpty()) {
                        container.addContainerFilter(
                                new SimpleStringFilter(pid, change.getText().toUpperCase(), true, false));
                    }
                });
                cell.setComponent(filterField);
            });
}

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

License:Apache License

public DocumentView() {
    Design.read(this);
    tabSheet.getTab(documentsLayout).setCaption(Translate.getMessage("Documents"));
    btnSearch.setCaption(Translate.getMessage("btnSearch"));
    btnRefresh.setCaption(Translate.getMessage("btnRefresh"));
    btnAddFile.setCaption(Translate.getMessage("btnAddFile"));
    btnAddFolder.setCaption(Translate.getMessage("btnAddFolder"));
    textFieldSearch.setCaption(Translate.getMessage("textFieldSearch"));

    Responsive.makeResponsive(panelLayout);
    btnAddFolder.setIcon(FontAwesome.FOLDER_O);
    btnAddFolder.addClickListener(this);
    btnAddFile.setIcon(FontAwesome.FILE_O);
    btnAddFile.addClickListener(this);

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

    textFieldSearch.setIcon(FontAwesome.SEARCH);

    documentsLayout.setMargin(new MarginInfo(true, false, false, false));
    documentsLayout.setExpandRatio(documentTable, 1f);

    documentTable.addContainerProperty("name", String.class, null, Translate.getMessage("tableDocumentsName"),
            null, Table.Align.LEFT);//from   w  w  w . j a va  2  s.  co m
    documentTable.setColumnExpandRatio("name", 1f);
    documentTable.addContainerProperty("description", String.class, null,
            Translate.getMessage("tableDocumentsTitle"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("creator", String.class, null,
            Translate.getMessage("tableDocumentsCreator"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("createDate", Date.class, null,
            Translate.getMessage("tableDocumentsCreateDate"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("updateDate", Date.class, null,
            Translate.getMessage("tableDocumentsUpdateDate"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("actions", TableButtonBar.class, null,
            Translate.getMessage("tableDocumentsActions"), null, Table.Align.LEFT);
    documentTable.setColumnWidth("createDate", 150);
    documentTable.setColumnWidth("updateDate", 150);
    documentTable.setColumnWidth("actions", 55);
    documentTable.addGeneratedColumn("name", new DocumentColumnGenerator(this));
    documentTable.addGeneratedColumn("createDate", new DateColumnGenerator());
    documentTable.addGeneratedColumn("updateDate", new DateColumnGenerator());
    documentTable.setVisibleColumns("name", "description", "creator", "createDate", "updateDate", "actions");
    tabSheet.addSelectedTabChangeListener(this);
}

From source file:com.mycollab.mobile.module.project.ui.SearchNavigationButton.java

License:Open Source License

public SearchNavigationButton() {
    super();/*ww w.  j  a  va  2  s  . co  m*/
    setIcon(FontAwesome.SEARCH);
    addStyleName(UIConstants.CIRCLE_BOX);
    this.addClickListener(
            navigationButtonClickEvent -> getNavigationManager().navigateTo(getSearchInputView()));
}

From source file:com.mycollab.module.crm.view.account.AccountSimpleSearchPanel.java

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPanel = new GridLayout(3, 3);
    layoutSearchPanel.setSpacing(true);/*  w w w .  j av  a2s  . com*/
    group = new ValueComboBox(false, "Name", "Email", "Website", "Phone",
            AppContext.getMessage(GenericI18Enum.FORM_ASSIGNEE));
    group.select("Name");
    group.setImmediate(true);
    group.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            removeComponents();
            String searchType = (String) group.getValue();
            if (searchType.equals("Name")) {
                addTextFieldSearch();
            } else if (searchType.equals("Email")) {
                addTextFieldSearch();
            } else if (searchType.equals("Website")) {
                addTextFieldSearch();
            } else if (searchType.equals("Phone")) {
                addTextFieldSearch();
            } else if (searchType.equals(AppContext.getMessage(GenericI18Enum.FORM_ASSIGNEE))) {
                addUserListSelectField();
            }
        }
    });

    layoutSearchPanel.addComponent(group, 1, 0);
    layoutSearchPanel.setComponentAlignment(group, Alignment.MIDDLE_CENTER);

    addTextFieldSearch();

    Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH));
    searchBtn.setStyleName(UIConstants.BUTTON_ACTION);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.setDescription("Search");

    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            doSearch();
        }
    });
    layoutSearchPanel.addComponent(searchBtn, 2, 0);
    layoutSearchPanel.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPanel);
}

From source file:com.mycollab.module.crm.view.campaign.CampaignSimpleSearchPanel.java

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPane = new GridLayout(3, 2);
    layoutSearchPane.setSpacing(true);//w  w w  . ja va  2 s. c  o m

    group = new ValueComboBox(false, "Campaign Name", "Start Date", "End Date");
    group.select("Campaign Name");
    group.setImmediate(true);
    group.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            removeComponents();
            String searchType = (String) group.getValue();
            if (searchType.equals("Campaign Name")) {
                addTextFieldSearch();
            } else if (searchType.equals("Start Date")) {
                addDateFieldSearch();
            } else if (searchType.equals("End Date")) {
                addDateFieldSearch();
            }
        }
    });

    layoutSearchPane.addComponent(group, 1, 0);
    layoutSearchPane.setComponentAlignment(group, Alignment.MIDDLE_CENTER);
    addTextFieldSearch();

    Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH));
    searchBtn.setStyleName(UIConstants.BUTTON_ACTION);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            doSearch();
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

From source file:com.mycollab.module.crm.view.cases.CaseSimpleSearchPanel.java

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPane = new GridLayout(3, 3);
    layoutSearchPane.setSpacing(true);/*from w  w w . j a  va 2s.  c o  m*/

    group = new ValueComboBox(false, "Subject", "Account Name", "Status",
            AppContext.getMessage(GenericI18Enum.FORM_ASSIGNEE));
    group.select("Name");
    group.setImmediate(true);
    group.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(ValueChangeEvent event) {
            removeComponents();
            String searchType = (String) group.getValue();
            if (searchType.equals("Subject")) {
                addTextFieldSearch();
            } else if (searchType.equals("Account Name")) {
                addTextFieldSearch();
            } else if (searchType.equals("Status")) {
                addTextFieldSearch();
            } else if (searchType.equals(AppContext.getMessage(GenericI18Enum.FORM_ASSIGNEE))) {
                addUserListSelectField();
            }
        }
    });

    layoutSearchPane.addComponent(group, 1, 0);
    layoutSearchPane.setComponentAlignment(group, Alignment.MIDDLE_CENTER);
    addTextFieldSearch();

    Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH));
    searchBtn.setStyleName(UIConstants.BUTTON_ACTION);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            doSearch();
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}