List of usage examples for com.vaadin.ui AbstractSplitPanel setSplitPosition
public void setSplitPosition(float pos, Unit unit)
From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.SplitPanelSplitPositionProperty.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 va 2 s . c o m } else { unit = Unit.PIXELS; } } component.setSplitPosition((Integer) value, unit); }
From source file:org.lunifera.runtime.web.vaadin.databinding.component.internal.SplitPanelSplitPositionUnitProperty.java
License:Open Source License
protected void doSetValue(Object source, Object value) { AbstractSplitPanel component = (AbstractSplitPanel) source; component.setSplitPosition(component.getSplitPosition(), (Unit) value); }
From source file:org.opennms.features.jmxconfiggenerator.webui.ui.mbeans.MBeansView.java
License:Open Source License
private AbstractSplitPanel initMainPanel(Component first, Component second) { AbstractSplitPanel layout = new HorizontalSplitPanel(); layout.setSizeFull();// w ww .j av a2 s.c om layout.setLocked(false); layout.setSplitPosition(20, UNITS_PERCENTAGE); layout.setFirstComponent(first); layout.setSecondComponent(second); layout.setCaption(first.getCaption()); return layout; }
From source file:org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.MBeansView.java
License:Open Source License
private AbstractSplitPanel initMainPanel(Tree first, Component second) { AbstractSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull();/*from ww w . j av a 2s .co m*/ splitPanel.setLocked(false); splitPanel.setSplitPosition(25, Unit.PERCENTAGE); splitPanel.setFirstComponent(first); splitPanel.setSecondComponent(second); splitPanel.setCaption(first.getCaption()); return splitPanel; }