Example usage for com.vaadin.ui Component setHeight

List of usage examples for com.vaadin.ui Component setHeight

Introduction

In this page you can find the example usage for com.vaadin.ui Component setHeight.

Prototype

public void setHeight(String height);

Source Link

Document

Sets the height of the component using String presentation.

Usage

From source file:org.semanticsoft.vaaclipse.widgets.WorkbenchWindow.java

License:Open Source License

public void setBottomBar(Component bar) {
    if (bar == null) {
        bottomBarContainer.removeAllComponents();
        return;/*  w  w w  .j a  va2 s.  c o  m*/
    }

    bar.setWidth("100%");
    bar.setHeight(-1);

    bottomBarContainer.removeAllComponents();
    bottomBarContainer.addComponent(bar);
}

From source file:org.vaadin.addons.portallayout.portlet.Portlet.java

License:Apache License

private void delegateSizeManagement(boolean initial) {
    final Component c = getParent();
    String width = String.format("%d%s", (int) c.getWidth(), c.getWidthUnits().getSymbol());

    if (c.getWidth() >= 0 && !"100%".equals(width)) {
        c.setWidth("100%");
        getState().width = width;//  ww  w . j  a  v  a  2 s .com
    }

    String height = String.format("%d%s", (int) c.getHeight(), c.getHeightUnits().getSymbol());
    if (c.getHeight() >= 0 && !"100%".equals(height)) {
        c.setHeight("100%");
        getState().height = height;
    }
    getParent().beforeClientResponse(initial);
}