Examples of UI


Examples of com.vaadin.ui.UI

            when(requestWithUIIDSet.getParameter(UIConstants.UI_ID_PARAMETER))
                    .thenReturn("1");
            when(requestWithUIIDSet.getWrappedSession()).thenReturn(
                    emptyWrappedSession);

            UI ui = sut.findUI(requestWithUIIDSet);
            Assert.assertNull("Unset session did not return null", ui);
        } catch (NullPointerException e) {
            Assert.fail("findUI threw a NullPointerException");
        }
    }
View Full Code Here

Examples of com.vaadin.ui.UI

        LoginForm lf = new LoginForm();
        lf.addListener(new LoginListener() {

            @Override
            public void onLogin(LoginEvent event) {
                UI r1 = UI.getCurrent();
                if (r1 != null) {
                    addComponent(new Label("UI.getCurrent().data: "
                            + r1.getData()));
                } else {
                    addComponent(new Label("UI.getCurrent() is null"));
                }
                UI r2 = ((LoginForm) event.getSource()).getUI();
                if (r2 != null) {
                    addComponent(new Label("event.getSource().data: "
                            + r2.getData()));
                } else {
                    addComponent(new Label(
                            "event.getSource().getRoot() is null"));
                }
            }
View Full Code Here

Examples of com.vaadin.ui.UI

        };

        session = new VaadinSession(mockService);
        session.storeInSession(mockService, mockWrappedSession);

        ui = new UI() {
            Page page = new Page(this, getState(false).pageState) {
                @Override
                public void init(VaadinRequest request) {
                }
            };
View Full Code Here

Examples of com.vaadin.ui.UI

    private BeanItemContainer<Window> windowlist = new BeanItemContainer<Window>(
            Window.class);

    @Override
    protected void setup() {
        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);
        }
        controlpanels.addComponent(new ControlPanel());
        getLayout().setSizeFull();
        getLayout().addComponent(controlpanels);
        getLayout().setComponentAlignment(controlpanels, Alignment.BOTTOM_LEFT);
View Full Code Here

Examples of com.vaadin.ui.UI

        control.replay();

        session = new MockVaadinSession(service);

        ui = new UI() {
            @Override
            protected void init(VaadinRequest request) {
            }
        };
        ui.doInit(request, 0, "");
View Full Code Here

Examples of com.vaadin.ui.UI

*/
public class AtmospherePushConnectionTest {
    @Test
    public void testSerialization() throws Exception {

        UI ui = EasyMock.createNiceMock(UI.class);
        AtmosphereResource resource = EasyMock
                .createNiceMock(AtmosphereResource.class);

        AtmospherePushConnection connection = new AtmospherePushConnection(ui);
        connection.connect(resource);
View Full Code Here

Examples of com.vaadin.ui.UI

            public void handleAction(Action action, Object sender, Object target) {
                Notification.show("Action!");
            }
        });

        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() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        window.bringToFront();
                    }
                });
        ((ComponentContainer) main.getContent()).addComponent(button);

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

    }
View Full Code Here

Examples of com.vaadin.ui.UI

        });
        return null;
    }

    private static UI createMockUI() {
        UI ui = EasyMock.createMock(UI.class);
        ui.setNavigator(EasyMock.anyObject(Navigator.class));
        EasyMock.replay(ui);
        return ui;
    }
View Full Code Here

Examples of com.vaadin.ui.UI

            @Override
            public boolean isConnectorEnabled() {
                return false;
            }
        };
        UI ui = createUI();
        b.setParent(ui);
        addClickListener(b);
        b.click();
        Assert.assertFalse("Button with disabled connector fires click events",
                clicked);
View Full Code Here

Examples of com.vaadin.ui.UI

                clicked);
    }

    private Button getButton() {
        Button b = new Button();
        UI ui = createUI();
        b.setParent(ui);
        addClickListener(b);
        return b;
    }
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.