Package com.vaadin.ui

Examples of com.vaadin.ui.Window


        getMainWindow().addComponent(horizontalLayout);
        final Component y9 = l;

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        final Window window = new Window();
        window.setHeight("500px");
        window.setWidth("500px");
        window.setPositionX(200);
        window.setPositionY(200);

        layout.addComponent(new Button("Scroll mainwin to X9",
                new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
View Full Code Here


    static int delay = 400;

    @Override
    protected void setup() {
        Window subWindow = new Window("Draggable sub window") {
            @Override
            public void setPositionX(int positionX) {
                try {
                    Thread.sleep(delay);
                } catch (InterruptedException e) {
View Full Code Here

        UI mainWindow = getMainWindow();
        HorizontalLayout controlpanels = new HorizontalLayout();
        for (int i = 1; i <= 5; i++) {
            VerticalLayout layout = new VerticalLayout();
            layout.setMargin(true);
            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);
View Full Code Here

     * VaadinRequest)
     */
    @Override
    protected void setup(VaadinRequest request) {

        Window w = new Window("Caption");
        w.setId("testwindow");
        w.setHeight("100px");
        w.setWidth("100px");
        w.setPositionX(100);
        w.setPositionY(100);
        addWindow(w);

        Button b = new Button();
        b.setId("testbutton");
        addComponent(b);
View Full Code Here

//Tests that  invisible divs don't overlap windows and don't block mouse events
public class WindowShadow extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        Window wnd = createWindow();
        wnd.setId("topwindow");
        Window wnd2 = createWindow();
        wnd2.setId("botwindow");
        wnd.setPositionX(100);
        wnd.setPositionY(100);
        wnd2.setPositionX(100);
        // Pick ycoord, that the top div of the Window overlaps with its footer
        int yCoord = (int) (wnd.getPositionX() + wnd.getHeight() - 5);
        wnd2.setPositionY(yCoord);
        UI.getCurrent().addWindow(wnd);
        UI.getCurrent().addWindow(wnd2);
    }
View Full Code Here

        UI.getCurrent().addWindow(wnd);
        UI.getCurrent().addWindow(wnd2);
    }

    private Window createWindow() {
        Window wnd = new Window();
        wnd.setHeight("200");
        wnd.setWidth("200");
        return wnd;
    }
View Full Code Here

public class UndefinedHeightSubWindowAndContent extends TestBase {

    @Override
    protected void setup() {
        Window subWindow = new Window("No scrollbars!");
        subWindow.setWidth("300px");
        subWindow.center();
        subWindow.setModal(true);
        VerticalLayout layout = new VerticalLayout();
        layout.setWidth("100%");
        subWindow.setContent(layout);

        final Form form = new Form();
        form.setFooter(null);
        form.setImmediate(true);
        form.setValidationVisible(true);
        form.setCaption("This is a form");
        form.setDescription("How do you do?");
        final TextField field1 = new TextField("Write here");
        field1.setImmediate(true);
        field1.addValidator(new Validator() {

            @Override
            public void validate(Object value) throws InvalidValueException {
                if (!isValid(value)) {
                    throw new InvalidValueException("FAIL!");
                }
            }

            public boolean isValid(Object value) {
                return field1.getValue().equals("valid");
            }
        });
        form.addField("Field 1", field1);
        layout.addComponent(form);

        getMainWindow().addWindow(subWindow);
        subWindow.bringToFront();
    }
View Full Code Here

    static final String COMBOBOX_ID = "combobox";

    @Override
    protected void setup(VaadinRequest request) {

        Window w = new Window();
        w.setId(WINDOW_ID);
        w.setWidth("300px");
        w.setHeight("300px");
        w.center();

        VerticalLayout content = new VerticalLayout();
        w.setContent(content);
        content.setHeight("1000px");
        ComboBox cb = new ComboBox();
        cb.setId(COMBOBOX_ID);
        content.addComponent(cb);
        content.setComponentAlignment(cb, Alignment.BOTTOM_CENTER);
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {

                VerticalLayout layout = new VerticalLayout();
                layout.setMargin(true);
                final Window w = new Window("Sub window", layout);
                w.center();
                layout.addComponent(new Button("Close",
                        new Button.ClickListener() {

                            @Override
                            public void buttonClick(ClickEvent event) {
                                w.close();
                            }
                        }));
                Button iconButton = new Button("A button with icon");
                iconButton
                        .setIcon(new ThemeResource("../runo/icons/16/ok.png"));
View Full Code Here

*/
public class MoveToTop extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        Window window = new Window("one");
        window.addStyleName("first-window");
        window.setWidth(200, Unit.PIXELS);
        window.setHeight(100, Unit.PIXELS);
        window.setPositionX(100);
        window.setPositionY(100);
        addWindow(window);

        window = new Window("two");
        window.setWidth(200, Unit.PIXELS);
        window.setHeight(100, Unit.PIXELS);
        window.setPositionX(150);
        window.setPositionY(150);
        window.addStyleName("second-window");
        addWindow(window);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Window

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.