Example usage for com.vaadin.server Sizeable getWidth

List of usage examples for com.vaadin.server Sizeable getWidth

Introduction

In this page you can find the example usage for com.vaadin.server Sizeable getWidth.

Prototype

public float getWidth();

Source Link

Document

Gets the width of the object.

Usage

From source file:com.vaadHL.utl.state.ScreenInfo.java

License:Apache License

/**
 * Gets size info from a screen object//from  w  w w  .  ja  v a2 s .c  o m
 * 
 * @param si
 *            si the screen object implementing the {@link Sizeable}
 *            interface
 */
public void sizeFrom(Sizeable si) {
    height = si.getHeight();
    heightUnits = si.getHeightUnits();
    width = si.getWidth();
    widthUnits = si.getWidthUnits();
}

From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.SizeableWidthProperty.java

License:Open Source License

protected Object doGetValue(Object source) {
    Sizeable component = (Sizeable) source;

    Unit widthUnit = component.getWidthUnits();
    if (widthUnit == null) {
        widthUnit = Unit.PIXELS;// w ww  .  j av a2  s.c o  m
    }

    return String.format("%s%s", Float.toString(component.getWidth()), widthUnit.getSymbol());
}