Package com.vaadin.ui

Examples of com.vaadin.ui.AbsoluteLayout$ComponentPosition


     * Represents the workaround given for this ticket.
     *
     * @return the created layout
     */
    private Component createComparisonTableOnFixed() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setWidth(200, Unit.PIXELS);
        absoluteLayout.setHeight(200, Unit.PIXELS);
        absoluteLayout.setCaption("comparison table in full size");

        Table table = new Table();
        table.setSizeFull();
        table.setId("comparison-table");
        absoluteLayout.addComponent(table, "top:0;bottom:0;left:0;right:0;");
        return absoluteLayout;
    }
View Full Code Here


     * full-sized {@link Table}.
     *
     * @return the created layout
     */
    private Component createTableOnFixed() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setWidth(200, Unit.PIXELS);
        absoluteLayout.setHeight(200, Unit.PIXELS);
        absoluteLayout.setCaption("full-sized table expected");

        Table table = new Table();
        table.setSizeFull();
        table.setId("full-table");
        absoluteLayout.addComponent(table);
        return absoluteLayout;
    }
View Full Code Here

     * half-sized {@link Table}.
     *
     * @return the created layout
     */
    private Component createHalfTableOnFixed() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setWidth(200, Unit.PIXELS);
        absoluteLayout.setHeight(200, Unit.PIXELS);
        absoluteLayout.setCaption("half-sized table expected");

        Table table = new Table();
        table.setWidth(50, Unit.PERCENTAGE);
        table.setHeight(50, Unit.PERCENTAGE);
        table.setId("half-table");
        absoluteLayout.addComponent(table);
        return absoluteLayout;
    }
View Full Code Here

     * half-sized {@link Table} and a fixed size {@link Table}.
     *
     * @return the created layout
     */
    private Component createHalfTableAndFixedTableOnFixed() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setWidth(200, Unit.PIXELS);
        absoluteLayout.setHeight(200, Unit.PIXELS);
        absoluteLayout.setCaption("half-sized and tiny expected");

        Table table = new Table();
        table.setWidth(50, Unit.PERCENTAGE);
        table.setHeight(50, Unit.PERCENTAGE);
        table.setId("halfwithtiny-table");
        absoluteLayout.addComponent(table);

        Table tableTiny = new Table();
        tableTiny.setWidth(50, Unit.PIXELS);
        tableTiny.setHeight(50, Unit.PIXELS);
        absoluteLayout.addComponent(tableTiny, "right:50;");
        return absoluteLayout;
    }
View Full Code Here

     * {@link Table}.
     *
     * @return the created layout
     */
    private Component createHalfTableOnFull() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setSizeFull();
        absoluteLayout.setId("halfinfull-layout");
        absoluteLayout.setCaption("half-sized table expected");

        Table table = new Table();
        table.setWidth(50, Unit.PERCENTAGE);
        table.setHeight(50, Unit.PERCENTAGE);
        table.setId("halfinfull-table");
        absoluteLayout.addComponent(table);
        return absoluteLayout;
    }
View Full Code Here

     * fixed-sized {@link AbsoluteLayout}.
     *
     * @return the created layout
     */
    private Component createFullOnFixed() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setWidth(200, Unit.PIXELS);
        absoluteLayout.setHeight(200, Unit.PIXELS);
        absoluteLayout.setId("fullonfixed-outer");
        absoluteLayout.addStyleName("green");
        absoluteLayout.setCaption("yellow area expected");

        AbsoluteLayout absoluteLayout2 = new AbsoluteLayout();
        absoluteLayout2.setSizeFull();
        absoluteLayout2.setId("fullonfixed-inner");
        absoluteLayout2.addStyleName("yellow");

        absoluteLayout.addComponent(absoluteLayout2, "top:50px;left:100px;");
        return absoluteLayout;
    }
View Full Code Here

     * full-sized {@link AbsoluteLayout}.
     *
     * @return the created layout
     */
    private AbsoluteLayout createFullOnFull() {
        AbsoluteLayout absoluteLayout = new AbsoluteLayout();
        absoluteLayout.setSizeFull();
        absoluteLayout.setId("fullonfull-outer");
        absoluteLayout.addStyleName("cyan");
        absoluteLayout.setCaption("area with red border expected");

        AbsoluteLayout absoluteLayout2 = new AbsoluteLayout();
        absoluteLayout2.setSizeFull();
        absoluteLayout2.setId("fullonfull-inner");
        absoluteLayout2.addStyleName("redborder");

        absoluteLayout.addComponent(absoluteLayout2, "top:50px;left:100px;");
        return absoluteLayout;
    }
View Full Code Here

public class AbsoluteLayoutWrapperStyles extends TestBase {

    @Override
    protected void setup() {
        AbsoluteLayout layout = new AbsoluteLayout();
        layout.setWidth("500px");
        layout.setHeight("500px");

        Label lbl = new Label("Label");
        lbl.setStyleName("my-label");
        lbl.addStyleName("my-second-label");
        layout.addComponent(lbl);

        Button btn = new Button("Button");
        btn.setStyleName("my-button");
        btn.addStyleName("my-second-button");
        layout.addComponent(btn, "top:50px;");

        addComponent(layout);
    }
View Full Code Here

    @Override
    protected void setup() {
        Layout main = getLayout();

        final Label l = new Label("A Label");
        final AbsoluteLayout al = new AbsoluteLayout();
        al.setWidth("300px");
        al.setHeight("200px");
        main.addComponent(al);

        final Button b = new Button("Add", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                if (l.getParent() == null) {
                    al.addComponent(l);
                    event.getButton().setCaption("Remove");
                } else {
                    al.removeComponent(l);
                    event.getButton().setCaption("Add");
                }

            }
View Full Code Here

public class AbsoluteLayoutPrimaryStylename extends TestBase {

    @Override
    protected void setup() {
        final AbsoluteLayout layout = new AbsoluteLayout();
        layout.setWidth("100px");
        layout.setWidth("200px");
        layout.setPrimaryStyleName("my-absolute-layout");

        Component comp1 = new NativeButton("Child 1");
        comp1.setWidth("100%");
        comp1.setHeight("50px");
        layout.addComponent(comp1);

        addComponent(layout);

        addComponent(new Button("Change primary stylename",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        layout.setPrimaryStyleName("my-second-absolute-layout");
                    }
                }));
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.AbsoluteLayout$ComponentPosition

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.