@Test public void wrapLayoutWithDevelopmentHeader() { final EmbedComponentConfig config = EmbedComponentConfig.defaultConfig(); config.setDevelopmentHeader(true); final ComponentWrapper wrapper = createWrapper(config); final HorizontalLayout layout = new HorizontalLayout(); final UI app = wrapper.wrap(layout); final Layout l = assertWrappingLayout(app); assertEquals("Layout was not set properly", layout, l); }
public UI wrap(Component component) { if (component instanceof UI) { return (UI) component; } if (component instanceof Window) { return wrapWindow((Window) component); } if (component instanceof Layout) { return wrapLayout((Layout) component); } final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(component); layout.setExpandRatio(component, 1); return wrapLayout(layout); }
ComponentWrapper { public UI wrap(Component component) { if (component instanceof UI) { return (UI) component; } if (component instanceof Window) { return wrapWindow((Window) component); } if (component instanceof Layout) { return wrapLayout((Layout) component); } final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(component); layout.setExpandRatio(component, 1); return wrapLayout(layout); } }
ComponentWrapper { public UI wrap(Component component) { if (component instanceof UI) { return (UI) component; } if (component instanceof Window) { return wrapWindow((Window) component); } if (component instanceof Layout) { return wrapLayout((Layout) component); } final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(component); layout.setExpandRatio(component, 1); return wrapLayout(layout); } ComponentWrapper(ComponentBasedVaadinServer server); }
ComponentWrapper { public UI wrap(Component component) { if (component instanceof UI) { return (UI) component; } if (component instanceof Window) { return wrapWindow((Window) component); } if (component instanceof Layout) { return wrapLayout((Layout) component); } final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(component); layout.setExpandRatio(component, 1); return wrapLayout(layout); } ComponentWrapper(ComponentBasedVaadinServer server); UI wrap(Component component); UI wrapLayout(Layout layout); UI wrapWindow(Window window); }
ComponentWrapper { public UI wrap(Component component) { if (component instanceof UI) { return (UI) component; } if (component instanceof Window) { return wrapWindow((Window) component); } if (component instanceof Layout) { return wrapLayout((Layout) component); } final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(component); layout.setExpandRatio(component, 1); return wrapLayout(layout); } ComponentWrapper(ComponentBasedVaadinServer server); UI wrap(Component component); UI wrapLayout(Layout layout); UI wrapWindow(Window window);  }