List of usage examples for com.vaadin.ui AbstractSplitPanel setMaxSplitPosition
public void setMaxSplitPosition(float pos, Unit unit)
From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.SplitPanelMaxSplitPositionProperty.java
License:Open Source License
protected void doSetValue(Object source, Object value) { AbstractSplitPanel component = (AbstractSplitPanel) source; Unit unit = component.getMaxSplitPositionUnit(); int pos = (Integer) value; if (unit != Unit.PIXELS && unit != Unit.PERCENTAGE) { if (pos <= 100) { unit = Unit.PERCENTAGE;/*from ww w . j a v a2 s .c om*/ } else { unit = Unit.PIXELS; } } component.setMaxSplitPosition((Integer) value, unit); }
From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.SplitPanelMaxSplitPositionUnitProperty.java
License:Open Source License
protected void doSetValue(Object source, Object value) { AbstractSplitPanel component = (AbstractSplitPanel) source; component.setMaxSplitPosition(component.getMaxSplitPosition(), (Unit) value); }