Package com.vaadin.ui

Examples of com.vaadin.ui.Window$Notification


        closeButton.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                while (!windows.isEmpty()) {
                    Window window = windows.pop();
                    removeWindow(window);
                }
            }

        });

        Button regularButton = new Button("Regular");
        regularButton.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                Window regularWindow = new Window("Regular window");
                openWindow(regularWindow);
            }
        });

        Button alertButton = new Button("Alert");
        alertButton.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Window alertWindow = new Window("Alert window");
                alertWindow.setAssistiveRole(WindowRole.ALERTDIALOG);
                openWindow(alertWindow);
            }
        });
        addComponent(closeButton);
        addComponent(regularButton);
View Full Code Here


    private void openSubWindow() {
        // Modal window
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        test = new Window("Modal window", layout);
        test.setModal(true);
        getMainWindow().addWindow(test);
        layout.addComponent(new Label(
                "You have to close this window before accessing others."));
View Full Code Here

        ol.addComponent(height);
        ol.addComponent(set);
        ol.setSpacing(true);
        ol.setMargin(true);

        Window controller = new Window("Controller");
        controller.setContent(ol);
        main.addWindow(controller);
    }
View Full Code Here

        test(gridLayout);
        populateLayout(gridLayout);

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        final Window window = new Window("TEST: Window", layout);
        test(window);
        populateLayout(layout);

    }
View Full Code Here

    }

    @Test
    public void addWindow_attachEventIsFired() {
        TestUI ui = new TestUI();
        final Window window = new Window();

        final boolean[] eventFired = new boolean[1];
        ui.addComponentAttachListener(new ComponentAttachListener() {

            @Override
View Full Code Here

    }

    @Test
    public void removeWindow_detachEventIsFired() {
        TestUI ui = new TestUI();
        final Window window = new Window();

        final boolean[] eventFired = new boolean[1];
        ui.addComponentDetachListener(new ComponentDetachListener() {

            @Override
View Full Code Here

    public Window window;

    @Before
    public void setup() {
        window = new Window();
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testAttachUsingSetContent() {
        UI ui = new MyUI();
        ui.setContent(new Window("foo"));
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testAddToLayout() {
        VerticalLayout vl = new VerticalLayout();
        vl.addComponent(new Window("foo"));
    }
View Full Code Here

                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        VerticalLayout layout = new VerticalLayout();
                        layout.setMargin(true);
                        final Window w = new Window("sw "
                                + System.currentTimeMillis(), layout);
                        main.addWindow(w);
                        w.setPositionX(100);
                        w.setPositionY(100);
                        w.setWidth("200px");
                        w.setHeight("200px");

                        w.setWidth("100px");
                        w.setHeight("400px");

                        final Button closebutton = new Button("Close "
                                + w.getCaption(), new Button.ClickListener() {
                            @Override
                            public void buttonClick(ClickEvent event) {
                                main.removeWindow(w);
                            }
View Full Code Here

TOP

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

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.