/** * Moves the position of the splitter with given position and unit. * * @param pos * the new size of the first region. Fractions are only allowed * when unit is percentage. * @param unit * the unit (from {@link Sizeable}) in which the size is given. */ public void setSplitPosition(float pos, Unit unit) { setSplitPosition(pos, unit, false); }
public AbstractSplitPanel() { registerRpc(rpc); setSplitPosition(50, Unit.PERCENTAGE, false); setSplitPositionLimits(0, Unit.PERCENTAGE, 100, Unit.PERCENTAGE); }
/** * Moves the position of the splitter. * * @param pos * the new size of the first region in the unit that was last * used (default is percentage). Fractions are only allowed when * unit is percentage. */ public void setSplitPosition(float pos) { setSplitPosition(pos, posUnit, false); }
/** * Moves the position of the splitter. * * @param pos * the new size of the region in the unit that was last used * (default is percentage). Fractions are only allowed when unit * is percentage. * * @param reverse * if set to true the split splitter position is measured by the * second region else it is measured by the first region */ public void setSplitPosition(float pos, boolean reverse) { setSplitPosition(pos, posUnit, reverse); }
@Override public void setSplitPosition(int pos) { component.setSplitPosition(pos); }
reversed = DesignAttributeHandler.readAttribute("reversed", design.attributes(), Boolean.class); setSplitPosition(getSplitPosition(), reversed); setSplitPosition(splitPosition.getSize(), splitPosition.getUnit(), reversed);
@Override public void setSplitPosition(int pos, SizeUnit unit, boolean reversePosition) { component.setSplitPosition(pos, WebWrapperUtils.toVaadinUnit(unit), reversePosition); }
@Override public void setSplitPosition(int pos, SizeUnit unit) { component.setSplitPosition(pos, WebWrapperUtils.toVaadinUnit(unit)); }
@Override public void applySettings(Element element) { if (!isSettingsEnabled()) { return; } Element e = element.element("position"); if (e != null) { String value = e.attributeValue("value"); String unit = e.attributeValue("unit"); if (!StringUtils.isBlank(value) && !StringUtils.isBlank(unit)) { Unit convertedUnit; if (NumberUtils.isNumber(unit)) { convertedUnit = convertLegacyUnit(Integer.parseInt(unit)); } else { convertedUnit = Unit.getUnitFromSymbol(unit); } component.setSplitPosition(Float.parseFloat(value), convertedUnit, component.isSplitPositionReversed()); } } }
private AbstractSplitPanel initMainPanel(Tree first, Component second) { AbstractSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setLocked(false); splitPanel.setSplitPosition(25, Unit.PERCENTAGE); splitPanel.setFirstComponent(first); splitPanel.setSecondComponent(second); splitPanel.setCaption(first.getCaption()); return splitPanel; }
private AbstractSplitPanel initMainPanel(Tree first, Component second) { AbstractSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setLocked(false); splitPanel.setSplitPosition(25, Unit.PERCENTAGE); splitPanel.setFirstComponent(first); splitPanel.setSecondComponent(second); splitPanel.setCaption(first.getCaption()); return splitPanel; }
private AbstractSplitPanel initMainPanel(Component first, Component second) { AbstractSplitPanel layout = new HorizontalSplitPanel(); layout.setSizeFull(); layout.setLocked(false); layout.setSplitPosition(20, UNITS_PERCENTAGE); layout.setFirstComponent(first); layout.setSecondComponent(second); layout.setCaption(first.getCaption()); return layout; }
float[] s = parseStringSize(a); if (s[0] >=0) ((AbstractSplitPanel)layout).setSplitPosition(s[0],(int)s[1]);
float[] s = parseStringSize(a); if (s[0] >=0) ((AbstractSplitPanel)layout).setSplitPosition(s[0],Unit.values()[(int)s[1]]);