Example usage for com.vaadin.ui VerticalLayout addListener

List of usage examples for com.vaadin.ui VerticalLayout addListener

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout addListener.

Prototype

@Override
    public Registration addListener(Component.Listener listener) 

Source Link

Usage

From source file:org.generationcp.breeding.manager.crosses.NurseryTemplateConditionsComponent.java

License:Open Source License

private VerticalLayout getLayoutGermplasmListTextField(final TextField txtField,
        final String germplasmListFor) {
    VerticalLayout germplasmListTextFieldLayout = new VerticalLayout();
    germplasmListTextFieldLayout.addComponent(txtField);
    germplasmListTextFieldLayout.addListener(new LayoutClickListener() {

        public void layoutClick(LayoutClickEvent event) {
            if (event.getChildComponent() == txtField) {
                SelectGermplasmListWindow selectListWindow = new SelectGermplasmListWindow(getMainClass(),
                        germplasmListFor);
                getWindow().addWindow(selectListWindow);
            }//w w  w  . j av a  2s .  c om
        }
    });

    return germplasmListTextFieldLayout;
}