Package com.vaadin.ui.Button

Examples of com.vaadin.ui.Button.ClickListener


        }
        rta = new RichTextArea();
        rta.setVisible(false);
        ts.addTab(rta, "Hidden rta", null);

        Button b = new Button("Show area", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                showHide();
            }
        });

        layout.addComponent(b);

        b = new Button("Show tab", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                showTab();
            }
View Full Code Here


        labelLong = new Label(
                "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");
        gl.addComponent(combo);
        gl.addComponent(labelLong);

        Button b = new Button("Add label text", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                labelLong.setValue(labelLong.getValue() + "-12345");
            }
View Full Code Here

    private void createUI(GridLayout layout) {
        HorizontalLayout buttonLayout = new HorizontalLayout();
        button1 = new Button("Button which is 50px wide");
        button1.setWidth("50px");
        button2 = new Button("Button without width");
        button3 = new Button("Click to repaint buttons", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                button1.markAsDirty();
                button2.markAsDirty();
View Full Code Here

        pageLengthLabel = new Label("");
        updatePageLengthLabel();
        addComponent(pageLengthLabel);

        Button updateButton = new Button("Update pageLength",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        updatePageLengthLabel();
                    }
View Full Code Here

        try {
            cl1 = new CustomLayout(new ByteArrayInputStream(s.getBytes()));
            layout.addComponent(cl1);

            layout.addComponent(new Button("Disable/Enable",
                    new ClickListener() {

                        @Override
                        public void buttonClick(ClickEvent event) {
                            boolean e = cl1.isEnabled();
View Full Code Here

        final CheckBox asModal = new CheckBox("As modal");
        main.addComponent(asModal);

        final Button create = new Button("Create a new window",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        VerticalLayout layout = new VerticalLayout();
                        layout.setMargin(true);
View Full Code Here

        mainWindow.addComponent(panelB);
        mainWindow.addComponent(panelC);

        selectPanel(selectedPanel);

        buttonNextPanel.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                selectedPanel++;
                if (selectedPanel > 2) {
                    selectedPanel = 0;
View Full Code Here

        result = new Label();
        main.addComponent(result);

        main.addComponent(new Button("click when rendered",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        endTest();
                    }
                }));

        main.addComponent(new Button(
                "Click for layout repaint (cached components)",
                new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        testContainer.markAsDirty();
                    }
                }));
View Full Code Here

    private final Button click2;
    private final TabSheet tab;

    public TestForBasicApplicationLayout() {

        click = new Button("Set height -1", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                tab.setHeight(null);
            }

        });

        click2 = new Button("Set height 100%", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                tab.setHeight(100, TabSheet.UNITS_PERCENTAGE);
            }
View Full Code Here

        addComponent(treeTable);

        Button refresh = new Button("Add two elements");
        addComponent(refresh);
        refresh.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                addTwoElements();
            }
        });

        Button reset = new Button("Reset");
        addComponent(reset);
        reset.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                container.removeAllItems();
            }
        });

        Button refresh5 = new Button("Add five elements");
        addComponent(refresh5);
        refresh5.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                container.addBean(new User("John", "Doe"));
                container.addBean(new User("Mark", "Twain"));
                container.addBean(new User("M", "T"));
                container.addBean(new User("J", "D"));
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Button.ClickListener

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.