Package com.vaadin.ui

Examples of com.vaadin.ui.Button$ClickEvent


        reader.setId("reader table");

        getLayout().addComponent(t1);
        getLayout().addComponent(t2);
        getLayout().addComponent(reader);
        getLayout().addComponent(new Button("Sync!"));

    }
View Full Code Here


            table.addContainerProperty("button", Button.class, null);
            table.addGeneratedColumn("button", new ColumnGenerator() {
                @Override
                public Object generateCell(Table source, Object itemId,
                        Object columnId) {
                    Button b = new Button("Button");
                    b.addStyleName("small");
                    return b;
                }
            });

            table.addContainerProperty("label", TextField.class, null);
View Full Code Here

    }

    private void createUI(GridLayout layout) {
        createPanel(layout);

        layout.addComponent(new Button("Change class name",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        b1.setStyleName(UUID.randomUUID().toString());
View Full Code Here

        innerLayout1 = new HorizontalLayout();
        innerLayout1.setSpacing(true);
        panelLayout.addComponent(innerLayout1);

        b1 = new Button("Button inside orderedLayout", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                System.out.println("Clicked " + event.getButton().getCaption());
            }
View Full Code Here

        main.addComponent(info);

        HorizontalLayout l = new HorizontalLayout();
        main.addComponent(l);

        l.addComponent(new Button("Toggle root panel",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        toggle(root);
                    }
                }));
        l.addComponent(new Button("Toggle panel one",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        toggle(one);
                    }
                }));
        l.addComponent(new Button("Toggle panel two",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        toggle(two);
                    }
                }));
        l.addComponent(new Button("Toggle form", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                toggle(form);
            }
        }));
        l.addComponent(new Button("Toggle table", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                toggle(table);
            }
        }));
View Full Code Here

        LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
        setMainWindow(w);
        // setTheme("tests-tickets");
        GridLayout gl = new GridLayout(4, 2);

        Button button = new Button("1", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                Button b = event.getButton();
                l.setValue(l.getValue() + b.getCaption());

            }

        });
View Full Code Here

        for (int i = 1; i < 100; i++) {
            table.addItem(new String[] { "Item " + i, null }, i);
        }

        // Add action button
        addComponent(new Button("Do It", new Button.ClickListener() {
            @Override
            public void buttonClick(Button.ClickEvent event) {
                // Set ItemProperty.COLUMN2 for all selected values of table
                Collection selectedIds = (Collection) table.getValue();
                for (final Object itemId : selectedIds) {
View Full Code Here

        LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
        setMainWindow(w);
        setTheme("tests-tickets");
        CustomLayout cl = new CustomLayout("Ticket2296");
        cl.setSizeFull();
        Button b = new Button("100%x100% button");
        b.setSizeFull();
        cl.addComponent(b, "button1");

        b = new Button("100%x100% button");
        b.setSizeFull();
        cl.addComponent(b, "button2");

        b = new Button("50%x50% button");
        b.setWidth("50%");
        b.setHeight("50%");
        cl.addComponent(b, "button3");

        w.setContent(cl);
    }
View Full Code Here

        VerticalLayout el = new VerticalLayout();
        Panel elp = new Panel(
                "Vertical ExpandLayout /w first component expanded", el);
        el.setHeight("1000px");
        for (int i = 0; i < 3; i++) {
            Button b = new Button("x");
            el.addComponent(b);
            if (i == 0) {
                b.setSizeFull();
                el.setExpandRatio(b, 1);
            }
        }
        lo.addComponent(elp);
        elp.setWidth("300px");
        elp.setHeight("300px");

        HorizontalLayout elh = new HorizontalLayout();
        Panel elph = new Panel(
                "Horizontal ExpandLayout /w first component expanded", elh);
        elh.setWidth("1000px");
        for (int i = 0; i < 3; i++) {
            Button b = new Button("x");
            elh.addComponent(b);
            if (i == 0) {
                b.setSizeFull();
                elh.setExpandRatio(b, 1);
            }
        }
        lo.addComponent(elph);
        elph.setWidth("300px");
View Full Code Here

        l = new VerticalLayout();
        l.setId("row-2");
        l.setSizeFull();
        item.getItemProperty("Column 4").setValue(l);

        Button clear = new Button("Clear");
        clear.setId(CLEAR_BUTTON_ID);
        clear.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                table.setValue(null);
            }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Button$ClickEvent

Copyright © 2018 www.massapicom. 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.