Package com.vaadin.ui

Examples of com.vaadin.ui.Window$CloseShortcut


public class WindowWithIcon extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        Window window = new Window("Window Caption");
        window.setIcon(FontAwesome.ROCKET);
        addWindow(window);
    }
View Full Code Here


                    } else {
                        msg.append("INVALID<br/><i>" + af.getErrorMessage()
                                + "</i><hr/>");
                    }
                }
                Window w = new Window("Status of the fields");
                w.setModal(true);
                w.setHeight("80%");
                w.setContent(new Label(msg.toString(), ContentMode.HTML));
                main.addWindow(w);
            }
        });
    }
View Full Code Here

            }
        }));

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        Window window = new Window("Testwindow", layout);
        layout.addComponent(new Label("I am inside the window"));
        applet.getUI().addWindow(window);
    }
View Full Code Here

                    } else {
                        msg.append("INVALID<br/><i>" + tf.getErrorMessage()
                                + "</i><hr/>");
                    }
                }
                Window w = new Window("Status of the fields");
                w.setModal(true);
                w.setContent(new Label(msg.toString(), ContentMode.HTML));
                main.addWindow(w);
            }
        });
    }
View Full Code Here

                super.attach();
            }
        };

        mainWindow.addComponent(label);
        Window loginWindow = createSubWindow();
        if (addSubWindowBeforeMainWindow) {
            mainWindow.addWindow(loginWindow);
        }

        log.log("Setting main window");
View Full Code Here

    }

    private Window createSubWindow() {
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        Window w = new Window("Sub window", layout) {
            @Override
            public void attach() {
                log(this);
                super.attach();
            }
        };
        Button okButton = new Button("OK") {
            @Override
            public void attach() {
                super.attach();
                log(this);
            }
        };
        okButton.addListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                log.log("Button clicked");

            }
        });
        okButton.setClickShortcut(KeyCode.ENTER);
        layout.addComponent(okButton);
        w.center();
        return w;
    }
View Full Code Here

            Button btnOpenModal = new Button("Open modal",
                    new Button.ClickListener() {

                        @Override
                        public void buttonClick(ClickEvent event) {
                            Window window = new Window("Caption");
                            window.setId(MODAL_ID);

                            VerticalLayout layout = new VerticalLayout();
                            layout.setWidth("300px");
                            layout.setHeight("300px");

                            TextField textField = new TextField();
                            textField.setId(TEXT_FIELD_IN_MODAL);

                            layout.addComponent(textField);
                            window.setContent(layout);

                            addWindow(window);

                            window.setModal(true);

                            setFocusedComponent(window);
                        }
                    });
View Full Code Here

    @Override
    protected void setup() {
        NativeSelect ns = new NativeSelect();

        Window modalWindow = new Window();
        modalWindow.setModal(true);
        modalWindow.center();

        addComponent(ns);
        getMainWindow().addWindow(modalWindow);

    }
View Full Code Here

    @Override
    protected void setup() {
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        Window w = new Window("full sized window", layout);
        w.setSizeFull();
        layout.setSizeFull();
        NativeButton b = new NativeButton("A large button");
        b.setSizeFull();
        layout.addComponent(b);
        getMainWindow().addWindow(w);
View Full Code Here

    @Override
    protected void setup() {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        final Window subwindow = new Window("subwindow", layout);
        subwindow.center();
        subwindow.setSizeUndefined();
        layout.setSizeUndefined();

        final Button tabButton = new Button("A button");
        tabButton.setCaption("Tab 1");
        tabButton.setWidth("200px");

        final Table table = new Table();
        table.setCaption("tab 2");
        table.setWidth("100%");
        table.setHeight("100%");

        final TabSheet tabsheet = new TabSheet();
        tabsheet.addComponent(tabButton);
        tabsheet.addComponent(table);
        tabsheet.addListener(new TabSheet.SelectedTabChangeListener() {
            @Override
            public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) {
                if (tabsheet.getSelectedTab() == tabButton) {
                    tabsheet.setSizeUndefined();
                    layout.setSizeUndefined();
                    subwindow.setSizeUndefined();
                } else if (tabsheet.getSelectedTab() == table) {
                    subwindow.setWidth("500px");
                    subwindow.setHeight("500px");
                    layout.setSizeFull();
                    tabsheet.setSizeFull();
                }
            }
        });
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Window$CloseShortcut

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.