Package com.vaadin.ui

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


    };

    @Override
    protected void setup(VaadinRequest request) {
        Button addButton = new Button("Add new Window");
        addButton.addListener(addListener);
        addComponent(addButton);

        addWindowAgain = new ComboBox("Add Window Again");
        addWindowAgain.setBuffered(false);
        addWindowAgain.setImmediate(true);
View Full Code Here


        Label l = new Label("This window is centered");
        l.setSizeUndefined();
        Button b = new Button(
                "Clicking here should not produce a layout click event");
        b.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                log.log("Click on button");
            }
View Full Code Here

            public Component getPopupComponent() {
                return remover;
            }
        });

        remover.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent event) {
                main.removeComponent(pv);
            }
        });
View Full Code Here

        // workaround for case #2
        // table.setWidth("300px");
        // table.setHeight("300px");

        Button refreshTable = new Button("Switch table container");
        refreshTable.addListener(new Button.ClickListener() {
            boolean full = true;

            @Override
            public void buttonClick(Button.ClickEvent e) {
                if (full) {
View Full Code Here

            table.setContainerDataSource(container);
            addComponent(table);
            final Label label = new Label();
            addComponent(label);
            Button button = new Button("Click");
            button.addListener(new Button.ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    try {
                        reduceData = !reduceData;
                        table.refreshRowCache();
View Full Code Here

                    }
                }
            });
            addComponent(button);
            Button button2 = new Button("Filter");
            button2.addListener(new Button.ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    try {
                        if (filter != null) {
                            container.removeAllContainerFilters();
View Full Code Here

        }

        public TableTestComponent() {

            Button switchContainerButton = new Button("switch container");
            switchContainerButton.addListener(new ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    if (testTable.getContainerDataSource() == containerA) {
                        testTable.setContainerDataSource(containerB);
                    } else {
View Full Code Here

                }
            });
            this.addComponent(switchContainerButton);

            Button clearButton = new Button("clear (click twice)");
            clearButton.addListener(new ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    try {
                        me.removeComponent(testTable);
View Full Code Here

        fill(container1, 100);

        table.setContainerDataSource(container1);

        Button refreshTable = new Button("Change table container");
        refreshTable.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent e) {
                table.setContainerDataSource(container2);
                table.setContainerDataSource(container1);
            }
View Full Code Here

                    mainLayout.replaceComponent(secondLayout, firstLayout);
                    mainLayout.setExpandRatio(firstLayout, 1);
                }
            }
        });
        second.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                if (mainLayout.getComponent(1).equals(firstLayout)) {
                    mainLayout.replaceComponent(firstLayout, secondLayout);
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.