Examples of AbsoluteLayout


Examples of com.vaadin.ui.AbsoluteLayout

    private TextField editEmail = new TextField();
    private PasswordField editPassword = new PasswordField();

    @Override
    protected void setup(VaadinRequest request) {
        mainLayout = new AbsoluteLayout();
        mainLayout.setImmediate(true);
        mainLayout.setWidth("100%");
        mainLayout.setHeight("100%");

        topBar.setHeight("50px");
View Full Code Here

Examples of com.vaadin.ui.AbsoluteLayout

    private AbsoluteLayout al;
    protected ComponentContainer vl;

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

        testButton = new Button("Click to move to inner layout",
                new Button.ClickListener() {
View Full Code Here

Examples of com.vaadin.ui.AbsoluteLayout

public class AbsoluteLayoutCorrectPositioningOfHiddenField extends TestBase {

    @Override
    protected void setup() {
        setTheme("tests-tickets");
        final AbsoluteLayout abs = new AbsoluteLayout();
        abs.setStyleName("borders");
        abs.setWidth("250px");
        abs.setHeight("100px");

        final Label l = new Label("Top 20, Left 20");
        l.setSizeUndefined();
        l.setId("positionedLabel");
        l.setVisible(false);
        abs.addComponent(l, "top:20px;left:20px");

        final Button action = new Button("Set visible");
        action.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                if (l.isVisible()) {
                    l.setValue("Top 70, Left 20");
                    ComponentPosition position = abs.getPosition(l);
                    position.setCSSString("top:70px;left:20px;");
                    abs.setPosition(l, position);
                } else {
                    l.setVisible(true);
                    action.setCaption("Move down");
                }
            }
        });
        action.setId("actionButton");
        abs.addComponent(action, "top: 70px;left: 150px;");

        addComponent(abs);
    }
View Full Code Here

Examples of com.vaadin.ui.AbsoluteLayout

    @Override
    protected void setup() {
        getLayout().setSizeFull();

        AbsoluteLayout al = new AbsoluteLayout();

        TextArea ta = new TextArea();
        ta.setValue("When resizing the layout this text area should also get resized");
        ta.setSizeFull();
        al.addComponent(ta, "left: 10px; right: 10px; top: 10px; bottom: 10px;");

        HorizontalSplitPanel horizPanel = new HorizontalSplitPanel();
        horizPanel.setSizeFull();
        horizPanel.setFirstComponent(al);
View Full Code Here

Examples of com.vaadin.ui.AbsoluteLayout

     * 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

Examples of com.vaadin.ui.AbsoluteLayout

     * 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

Examples of com.vaadin.ui.AbsoluteLayout

     * 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

Examples of com.vaadin.ui.AbsoluteLayout

     * 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

Examples of com.vaadin.ui.AbsoluteLayout

     * {@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

Examples of com.vaadin.ui.AbsoluteLayout

     * 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
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.