Package com.vaadin.ui

Examples of com.vaadin.ui.UI.addWindow()


        TestApp app = new TestApp();
        app.init();
        Window subWindow = new Window("Sub window");
        UI mainWindow = app.getMainWindow();

        mainWindow.addWindow(subWindow);
        // Added to main window so the parent of the sub window should be the
        // main window
        assertEquals(subWindow.getParent(), mainWindow);

        try {
View Full Code Here


        // Added to main window so the parent of the sub window should be the
        // main window
        assertEquals(subWindow.getParent(), mainWindow);

        try {
            mainWindow.addWindow(subWindow);
            assertTrue("Window.addWindow did not throw the expected exception",
                    false);
        } catch (IllegalArgumentException e) {
            // Should throw an exception as it has already been added to the
            // main window
View Full Code Here

    public void removeSubWindow() {
        TestApp app = new TestApp();
        app.init();
        Window subWindow = new Window("Sub window");
        UI mainWindow = app.getMainWindow();
        mainWindow.addWindow(subWindow);

        // Added to main window so the parent of the sub window should be the
        // main window
        assertEquals(subWindow.getParent(), mainWindow);
View Full Code Here

            Window dialog = new Window("Dialog " + i, layout);
            layout.setSizeUndefined();
            windowlist.addBean(dialog);
            layout.addComponent(new Label("this is dialog number " + i));
            layout.addComponent(new ControlPanel());
            mainWindow.addWindow(dialog);
        }
        controlpanels.addComponent(new ControlPanel());
        getLayout().setSizeFull();
        getLayout().addComponent(controlpanels);
        getLayout().setComponentAlignment(controlpanels, Alignment.BOTTOM_LEFT);
View Full Code Here

            }
        });

        UI main = getLayout().getUI();

        main.addWindow(window);

        ((ComponentContainer) main.getContent()).addComponent(new TextField());

        Button button = new Button("Bring to front (should focus too)",
                new Button.ClickListener() {
View Full Code Here

                    }
                });
        ((ComponentContainer) main.getContent()).addComponent(button);

        Window window2 = new Window("Another window for testing");
        main.addWindow(window2);
        window2.setPositionX(50);

    }
}
View Full Code Here

    @Override
    protected void setup() {
        UI w = getLayout().getUI();

        HorizontalSortableCssLayoutWithWrappers verticalSortableCssLayoutWithWrappers = new HorizontalSortableCssLayoutWithWrappers();
        w.addWindow(verticalSortableCssLayoutWithWrappers);
        verticalSortableCssLayoutWithWrappers.setPositionX(200);
        verticalSortableCssLayoutWithWrappers.setPositionY(40); /*
                                                                 * FIXME:
                                                                 * subwindow
                                                                 * horizontal
 
View Full Code Here

         * Check the code in implementing classes.
         */
        Window acceptAnyThing = new AcceptAnythingWindow();
        Window acceptFromTree1viaServerCheck = new AcceptFromComponent(tree1);

        w.addWindow(acceptAnyThing);
        acceptAnyThing.setPositionY(450);
        acceptAnyThing.setPositionX(150);
        w.addWindow(acceptFromTree1viaServerCheck);
        acceptFromTree1viaServerCheck.setPositionY(450);
        acceptFromTree1viaServerCheck.setPositionX(450);
View Full Code Here

        Window acceptFromTree1viaServerCheck = new AcceptFromComponent(tree1);

        w.addWindow(acceptAnyThing);
        acceptAnyThing.setPositionY(450);
        acceptAnyThing.setPositionX(150);
        w.addWindow(acceptFromTree1viaServerCheck);
        acceptFromTree1viaServerCheck.setPositionY(450);
        acceptFromTree1viaServerCheck.setPositionX(450);

    }
View Full Code Here

     * @param window the pop-up window to wrap
     * @return an application displaying that pop-up window
     */
    public UI wrapWindow(Window window) {
        final UI ui = wrapLayout(new VerticalLayout());
        ui.addWindow(window);
        return ui;
    }

    /**
     * A development {@link UI} that displays a simple layout.
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.