List of usage examples for com.vaadin.server Sizeable getWidthUnits
public Unit getWidthUnits();
From source file:com.vaadHL.utl.state.ScreenInfo.java
License:Apache License
/** * Gets size info from a screen object// ww w . j a va 2 s .co 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;/*from w ww. j a va 2s .c om*/ } return String.format("%s%s", Float.toString(component.getWidth()), widthUnit.getSymbol()); }