Example usage for com.vaadin.ui AbstractLayout setWidth

List of usage examples for com.vaadin.ui AbstractLayout setWidth

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractLayout setWidth.

Prototype

@Override
    public void setWidth(String width) 

Source Link

Usage

From source file:edu.nps.moves.mmowgli.components.GhostVerticalLayoutWrapper.java

License:Open Source License

public void ghost_setContent(AbstractLayout lay) {
    middle.addComponent(lay);/*from   w  w  w .  j  av a 2  s .co  m*/
    // won't work? lay.addStyleName("m-ghostBoxContent");
    lay.setWidth(CONTENT_WIDTH);
}

From source file:org.semanticsoft.vaaclipse.presentation.renderers.TrimBarRenderer.java

License:Open Source License

@Override
public void createWidget(MUIElement element, MElementContainer<MUIElement> parent) {
    if (!(element instanceof MTrimBar)) {
        return;/*from   ww  w . j  a  va 2s  . c o m*/
    }

    MTrimBar mTrimBar = (MTrimBar) element;
    int orientation = mTrimBar.getSide().getValue();

    AbstractLayout trimBar = null;

    if (orientation == SideValue.BOTTOM_VALUE) {
        trimBar = new CssLayout();
        trimBar.addStyleName("horizontaltrimbar");
    } else if (orientation == SideValue.TOP_VALUE) {
        trimBar = new CssLayout();
        trimBar.addStyleName("toptrimbar");
    } else if (orientation == SideValue.LEFT_VALUE || orientation == SideValue.RIGHT_VALUE) {
        trimBar = new VerticalLayout();
        trimBar.addStyleName("verticaltrimbar");
    }

    trimBar.setSizeUndefined();

    if (orientation == SideValue.BOTTOM_VALUE || orientation == SideValue.TOP_VALUE) {
        trimBar.setWidth("100%");
    }

    element.setWidget(trimBar);
}