Package com.vaadin.ui

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


        tf.addListener(blurListener);
        df.addListener(focusListener);
        df.addListener(blurListener);
        cb.addListener(focusListener);
        cb.addListener(blurListener);
        btn.addListener(focusListener);
        btn.addListener(blurListener);
        nbtn.addListener(focusListener);
        nbtn.addListener(blurListener);
        chkb.addListener(focusListener);
        chkb.addListener(blurListener);
View Full Code Here


        df.addListener(focusListener);
        df.addListener(blurListener);
        cb.addListener(focusListener);
        cb.addListener(blurListener);
        btn.addListener(focusListener);
        btn.addListener(blurListener);
        nbtn.addListener(focusListener);
        nbtn.addListener(blurListener);
        chkb.addListener(focusListener);
        chkb.addListener(blurListener);
        og.addListener(focusListener);
View Full Code Here

        cssLayout.addComponent(l);

        sp.addComponent(cssLayout);

        Button button = new Button("b");
        button.addListener(new ClickListener() {
            boolean bool = true;

            @Override
            public void buttonClick(ClickEvent event) {
                sp.setExpandRatio(cssLayout, bool ? 1 : 0);
View Full Code Here

                "A hidden text field");
        final TextField tfVisible = new TextField("Visible text field caption",
                "A visible text field");
        tfHidden.setVisible(false);
        Button b = new Button("Move hidden textfield to other layout");
        b.addListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                if (layout1.getComponentIndex(tfHidden) != -1) {
                    layout2.addComponent(tfVisible);
View Full Code Here

                Notification.TYPE_WARNING_MESSAGE);
        getMainWindow().showNotification("Notification 2",
                Notification.TYPE_WARNING_MESSAGE);

        Button b = new Button("Button");
        b.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Window w = new Window("This is a window");
                w.setModal(true);
                getMainWindow().addWindow(w);
View Full Code Here

                        : null);
            }
        });

        final Button changeValueButton = new Button("Change Value to 2");
        changeValueButton.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent event) {
                globalValue.setValue("2");
            }
        });
View Full Code Here

    protected Component createButtonAction(String caption,
            final Command<T, Boolean> command) {

        Button button = new Button(caption);
        button.setData(Boolean.FALSE);
        button.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Button b = event.getButton();
                boolean state = (Boolean) b.getData();
                b.setData(!state);
View Full Code Here

            }
        });
        fl.addComponent(ml);

        Button b = new Button("Select all ( selectAll() )");
        b.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                activeComponent.selectAll();
            }
        });
View Full Code Here

        selectRange
                .setCaption("Select range of text ( setSelectionRange(int start, int lengt) )");
        final TextField start = new TextField("From:");
        final TextField length = new TextField("Selection length:");
        b = new Button("select");
        b.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                int startPos = Integer.parseInt(start.getValue());
                int lenght = Integer.parseInt(length.getValue());
View Full Code Here

        fl.addComponent(selectRange);

        HorizontalLayout setCursorPosition = new HorizontalLayout();
        final TextField pos = new TextField("Position:");
        b = new Button("set");
        b.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                int startPos = Integer.parseInt(pos.getValue());
                activeComponent.setCursorPosition(startPos);
            }
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.