/** * Sets vertical flexibility hint of this component. * <p>Number flex indicates how * this component's container distributes remaining empty space among its * children vertically. Flexible component grow and shrink to fit their * given space. Flexible components with larger flex values will be made * larger than components with lower flex values, at the ratio determined by * all flexible components. The actual flex value is not relevant unless * there are other flexible components within the same container. Once the * default sizes of components in a container are calculated, the remaining * space in the container is divided among the flexible components, * according to their flex ratios.</p> * <p>Specify a flex value of negative value, 0, * or "false" has the same effect as leaving the flex attribute out entirely. * Specify a flex value of "true" has the same effect as a flex value of 1.</p> * <p>Special flex hint, <b>"min"</b>, indicates that the minimum space shall be * given to this flexible component to enclose all of its children components. * That is, the flexible component grow and shrink to fit its children components.</p> * * @param flex the vertical flex hint. * @since 5.0.0 * @see #setHflex * @see #getVflex */ public void setVflex(String flex) { if (getHeight() != null && !(flex == null || "min".equals(flex))) { throw new UiException("Not allowed to set vflex and height at the same time except vflex=\"min\""); } setVflex0(flex); }