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.module.crm.view.account.AccountSimpleSearchPanel.java

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPane = new GridLayout(3, 3);
    layoutSearchPane.setSpacing(true);/*from ww w . j av  a2s .  c om*/
    final ValueComboBox 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();
            }
        }
    });

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

    addTextFieldSearch();

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

    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new AccountSearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Name")) {
                            searchCriteria.setAccountname(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Email")) {
                            searchCriteria.setAnyMail(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Website")) {
                            searchCriteria.setWebsite(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Phone")) {
                            searchCriteria.setAnyPhone(new StringSearchField(SearchField.AND, strSearch));
                        }
                    }
                }

                if (userBox != null) {
                    String user = (String) userBox.getValue();
                    if (StringUtils.isNotBlank(user)) {
                        searchCriteria
                                .setAssignUsers(new SetSearchField<>(SearchField.AND, new String[] { user }));
                    }
                }
            }

            AccountSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

From source file:com.esofthead.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  .j av  a2  s  . com

    final ValueComboBox 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.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new CampaignSearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Campaign Name")) {
                            searchCriteria.setCampaignName(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Email")) {
                        } else if (searchType.equals("Phone")) {
                        }
                    }
                }

            }
            CampaignSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

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

License:Open Source License

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

    final ValueComboBox 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.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new CaseSearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Subject")) {
                            searchCriteria.setSubject(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Status")) {
                            searchCriteria.setStatuses(
                                    new SetSearchField<String>(SearchField.AND, new String[] { strSearch }));
                        }
                    }
                }

                if (userBox != null) {
                    String user = (String) userBox.getValue();
                    if (StringUtils.isNotBlank(user)) {
                        searchCriteria.setAssignUsers(
                                new SetSearchField<String>(SearchField.AND, new String[] { user }));
                    }
                }
            }

            CaseSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

From source file:com.esofthead.mycollab.module.crm.view.contact.ContactSimpleSearchPanel.java

License:Open Source License

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

    final ValueComboBox group = new ValueComboBox(false, "Name", "Email", "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("Phone")) {
                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.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new ContactSearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Name")) {
                            searchCriteria.setContactName(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Email")) {
                            searchCriteria.setAnyEmail(new StringSearchField(SearchField.AND, strSearch));
                        } else if (searchType.equals("Phone")) {
                            searchCriteria.setAnyPhone(new StringSearchField(SearchField.AND, strSearch));
                        }
                    }
                }

                if (userBox != null) {
                    String user = (String) userBox.getValue();
                    if (StringUtils.isNotBlank(user)) {
                        searchCriteria.setAssignUsers(
                                new SetSearchField<String>(SearchField.AND, new String[] { user }));
                    }
                }
            }

            ContactSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

From source file:com.esofthead.mycollab.module.crm.view.lead.LeadSimpleSearchPanel.java

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPane = new GridLayout(3, 3);
    layoutSearchPane.setSpacing(true);/*  w w  w . ja v a 2 s  . co m*/

    final ValueComboBox group = new ValueComboBox(false, "Name", "Email", "Phone",
            AppContext.getMessage(GenericI18Enum.FORM_ASSIGNEE));
    group.select("Name");
    group.setImmediate(true);
    group.addValueChangeListener(new Property.ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        @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("Phone")) {
                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.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new LeadSearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Name")) {
                            searchCriteria.setLeadName(new StringSearchField(SearchField.AND, strSearch));
                        }
                    }
                }

                if (userBox != null) {
                    String user = (String) userBox.getValue();
                    if (StringUtils.isNotBlank(user)) {
                        searchCriteria
                                .setAssignUsers(new SetSearchField<>(SearchField.AND, new String[] { user }));
                    }
                }
            }

            LeadSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

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

License:Open Source License

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

    final ValueComboBox group = new ValueComboBox(false, "Name", "Account Name", "Sales Stage",
            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("Account Name")) {
                addTextFieldSearch();
            } else if (searchType.equals("Sales Stage")) {
                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.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new OpportunitySearchCriteria();
            searchCriteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));

            String searchType = (String) group.getValue();
            if (StringUtils.isNotBlank(searchType)) {

                if (textValueField != null) {
                    String strSearch = textValueField.getValue();
                    if (StringUtils.isNotBlank(strSearch)) {

                        if (searchType.equals("Name")) {
                            searchCriteria
                                    .setOpportunityName(new StringSearchField(SearchField.AND, strSearch));
                        }
                    }
                }

                if (userBox != null) {
                    String user = (String) userBox.getValue();
                    if (StringUtils.isNotBlank(user)) {
                        searchCriteria.setAssignUsers(
                                new SetSearchField<String>(SearchField.AND, new String[] { user }));
                    }
                }
            }

            OpportunitySimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 2, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(layoutSearchPane);
}

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

License:Open Source License

private void createBasicSearchLayout() {
    layoutSearchPane = new GridLayout(5, 3);
    layoutSearchPane.setSpacing(true);/*from ww  w  .  j a  v a  2  s  . com*/

    addTextFieldSearch();

    final CheckBox chkIsOpenBug = new CheckBox("Only Open Bugs");
    layoutSearchPane.addComponent(chkIsOpenBug, 2, 0);
    layoutSearchPane.setComponentAlignment(chkIsOpenBug, Alignment.MIDDLE_CENTER);

    Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH));
    searchBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            searchCriteria = new BugSearchCriteria();
            searchCriteria.setProjectId(
                    new NumberSearchField(SearchField.AND, CurrentProjectVariables.getProject().getId()));
            searchCriteria.setSummary(new StringSearchField(textValueField.getValue().trim()));

            if (chkIsOpenBug.getValue()) {
                searchCriteria.setStatuses(new SetSearchField<>(SearchField.AND, new String[] {
                        BugStatus.InProgress.name(), BugStatus.Open.name(), BugStatus.ReOpened.name() }));
            }

            BugSimpleSearchPanel.this.notifySearchHandler(searchCriteria);
        }
    });
    layoutSearchPane.addComponent(searchBtn, 3, 0);
    layoutSearchPane.setComponentAlignment(searchBtn, Alignment.MIDDLE_CENTER);

    Button clearBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CLEAR));
    clearBtn.setStyleName(UIConstants.THEME_GRAY_LINK);
    clearBtn.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            textValueField.setValue("");
        }
    });

    layoutSearchPane.addComponent(clearBtn, 4, 0);
    layoutSearchPane.setComponentAlignment(clearBtn, Alignment.MIDDLE_CENTER);

    this.setCompositionRoot(layoutSearchPane);
}

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

License:Open Source License

private VerticalLayout createSearchPanel() {
    MVerticalLayout basicSearchBody = new MVerticalLayout()
            .withMargin(new MarginInfo(true, false, true, false));
    basicSearchBody.addStyleName(UIConstants.BORDER_BOX_2);

    nameField = new TextField();

    nameField.setWidth(UIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    MHorizontalLayout control = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, false));

    final Button searchBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SEARCH));
    searchBtn.setIcon(FontAwesome.SEARCH);
    searchBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    searchBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/*w  w  w .j av  a  2  s.  c  o  m*/
        public void buttonClick(final ClickEvent event) {
            TaskSearchCriteria searchCriteria = new TaskSearchCriteria();
            searchCriteria.setProjectid(new NumberSearchField(CurrentProjectVariables.getProjectId()));
            searchCriteria.setTaskName(new StringSearchField(nameField.getValue().trim()));
            TaskFilterParameter taskFilter = new TaskFilterParameter(searchCriteria, "Task Search");
            moveToTaskSearch(taskFilter);
        }
    });
    control.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_CENTER);

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

                @Override
                public void buttonClick(final ClickEvent event) {
                    TaskSearchCriteria searchCriteria = new TaskSearchCriteria();
                    searchCriteria.setProjectid(new NumberSearchField(CurrentProjectVariables.getProjectId()));
                    searchCriteria.setTaskName(new StringSearchField(nameField.getValue().trim()));
                    TaskFilterParameter taskFilter = new TaskFilterParameter(searchCriteria, "Task Search");
                    taskFilter.setAdvanceSearch(true);
                    moveToTaskSearch(taskFilter);
                }
            });
    advancedSearchBtn.setStyleName(UIConstants.THEME_BLUE_LINK);
    control.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    basicSearchBody.with(control).withAlign(control, Alignment.MIDDLE_CENTER);

    return basicSearchBody;
}

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

License:Open Source License

private HorizontalLayout createButtonControls() {
    MHorizontalLayout buttonControls = new MHorizontalLayout().withSpacing(true).withMargin(true);

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

                @Override// w  ww  .j  a  v  a2s . co  m
                public void buttonClick(final ClickEvent event) {
                    DynamicQueryParamLayout.this.callSearchAction();
                }
            });
    searchBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    searchBtn.setIcon(FontAwesome.SEARCH);

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

    final 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.THEME_GRAY_LINK);

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

    final 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>) DynamicQueryParamLayout.this.searchPanel)
                            .moveToBasicSearchLayout();
                }
            });
    basicSearchBtn.setStyleName("link");
    buttonControls.with(basicSearchBtn).withAlign(basicSearchBtn, Alignment.MIDDLE_CENTER);
    return buttonControls;
}

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

License:Open Source License

public SearchTextField() {
    this.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT);
    icon = new FontIconLabel(FontAwesome.SEARCH);
    innerField = new TextField();
    innerField.setImmediate(true);//w  ww  .j a va2  s  .  com
    innerField.setInputPrompt("Search");
    innerField.setWidth("180px");
    this.with(icon, innerField).withStyleName("searchfield");
    ShortcutExtension.installShortcutAction(innerField, shortcutListener);
}