Package com.vaadin.ui

Examples of com.vaadin.ui.TextField.addListener()


    public void setup() {
        addComponent(log);
        TextField tf1 = new TextField("TextField 1",
                "Has focus and blur listeners");
        tf1.setWidth("300px");
        tf1.addListener((FocusListener) this);
        tf1.addListener((BlurListener) this);

        addComponent(tf1);

        TextField tf2 = new TextField("TextField 2",
View Full Code Here


        addComponent(log);
        TextField tf1 = new TextField("TextField 1",
                "Has focus and blur listeners");
        tf1.setWidth("300px");
        tf1.addListener((FocusListener) this);
        tf1.addListener((BlurListener) this);

        addComponent(tf1);

        TextField tf2 = new TextField("TextField 2",
                "Has focus, blur and valuechange listeners");
View Full Code Here

        addComponent(tf1);

        TextField tf2 = new TextField("TextField 2",
                "Has focus, blur and valuechange listeners");
        tf2.setWidth("300px");
        tf2.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                TextFieldFocusAndBlurListeners.this.valueChange(event);
            }
View Full Code Here

            @Override
            public void valueChange(ValueChangeEvent event) {
                TextFieldFocusAndBlurListeners.this.valueChange(event);
            }
        });
        tf2.addListener(new FocusListener() {

            @Override
            public void focus(FocusEvent event) {
                TextFieldFocusAndBlurListeners.this.focus(event);
            }
View Full Code Here

            public void focus(FocusEvent event) {
                TextFieldFocusAndBlurListeners.this.focus(event);
            }

        });
        tf2.addListener(new BlurListener() {

            @Override
            public void blur(BlurEvent event) {
                TextFieldFocusAndBlurListeners.this.blur(event);
            }
View Full Code Here

        addComponent(tf2);

        TextField tf3 = new TextField("TextField 3",
                "Has non-immediate valuechange listener");
        tf3.setWidth("300px");
        tf3.addListener((ValueChangeListener) this);

        addComponent(tf3);

        TextField tf4 = new TextField("TextField 4",
                "Has immediate valuechange listener");
View Full Code Here

        TextField tf4 = new TextField("TextField 4",
                "Has immediate valuechange listener");
        tf4.setWidth("300px");
        tf4.setImmediate(true);
        tf4.addListener((ValueChangeListener) this);

        addComponent(tf4);
    }

    @Override
View Full Code Here

        final TextField tf = new TextField("Try to change me");
        main.addComponent(tf);

        tf.setImmediate(true);
        tf.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                main.showNotification("New value = " + tf);
            }
View Full Code Here

        final TextField tf2 = new TextField("Try to change me");
        main.addComponent(tf2);

        tf2.setImmediate(true);
        tf2.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                main.showNotification("New value = " + tf2);
            }
View Full Code Here

        main.addComponent(description);

        final GridLayout grid = new GridLayout(4, 1);

        final TextField size = new TextField("Grid width in css unit");
        size.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                String width = size.getValue().toString();
                if (width == null || width.equals("")) {
                    grid.setSizeUndefined();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.