Package com.vaadin.ui

Examples of com.vaadin.ui.LegacyWindow.addComponent()


        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        final Panel p = new Panel(pl);
        p.setStyleName(Reindeer.PANEL_LIGHT);
        main.addComponent(p);
        p.setHeight("100px");

        final Label l = new Label("foobar");

        pl.addComponent(l);
View Full Code Here


            public void buttonClick(ClickEvent event) {
                p.setVisible(!p.isVisible());
            }
        });

        main.addComponent(b);
        main.addComponent(b2);

    }

}
View Full Code Here

                p.setVisible(!p.isVisible());
            }
        });

        main.addComponent(b);
        main.addComponent(b2);

    }

}
View Full Code Here

                "window.print()", "document.write('foo')" }) {
            VerticalLayout pl = new VerticalLayout();
            pl.setMargin(true);
            Panel p = new Panel("Example: " + script, pl);
            pl.addComponent(createScriptButton(script));
            mainWindow.addComponent(p);
        }

    }

    private Button createScriptButton(final String script) {
View Full Code Here

    public void init() {
        final LegacyWindow main = new LegacyWindow(getClass().getName()
                .substring(getClass().getName().lastIndexOf(".") + 1));
        setMainWindow(main);
        URL url = getURL();
        main.addComponent(new Label(
                "Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));

        Label l = new Label();
        l.setContentMode(ContentMode.HTML);
        l.setValue("This is a label with as slow image. <img src=\"" + url
View Full Code Here

        Label l = new Label();
        l.setContentMode(ContentMode.HTML);
        l.setValue("This is a label with as slow image. <img src=\"" + url
                + "/icon.png\" />");
        main.addComponent(l);

        l = new Label();
        l.setContentMode(ContentMode.HTML);
        l.setValue("This is a label with as slow image. <img src=\"" + url
                + "/icon.png\" />");
View Full Code Here

        l = new Label();
        l.setContentMode(ContentMode.HTML);
        l.setValue("This is a label with as slow image. <img src=\"" + url
                + "/icon.png\" />");
        main.addComponent(l);

    }
}
View Full Code Here

        layout1.setStyleName("borders");
        Label label = new Label(
                "This should not be wider than this label + reserved error space");
        label.setCaption("A caption");
        layout1.addComponent(label);
        w.addComponent(layout1);

        layout2 = new FormLayout();
        layout2.setWidth("500px");
        layout2.setStyleName("borders");
        label = new Label("This should be 500px wide");
View Full Code Here

        layout2.setWidth("500px");
        layout2.setStyleName("borders");
        label = new Label("This should be 500px wide");
        label.setCaption("A caption");
        layout2.addComponent(label);
        w.addComponent(layout2);

        Button b = new Button("Swap", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

                    layout2.setWidth("500px");
                }
            }

        });
        w.addComponent(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.