/** The minimum height for the container. The value will override any value that is set on the container itself. * <p> * For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com. * @param height The height expressed as a <code>UnitValue</code>. E.g. "100px" or "200mm". * @return <code>this</code> so it is possible to chain calls. E.g. <code>new LayoutConstraint().noGrid().gap().fill()</code>. */ public final LC minHeight(String height) { setHeight(LayoutUtil.derive(getHeight(), ConstraintParser.parseUnitValue(height, false), null, null)); return this; }
/** The maximum height for the container. The value will override any value that is set on the container itself. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcontainers.com. * @param height The height expressed as a <code>UnitValue</code>. E.g. "100px" or "200mm". * @return <code>this</code> so it is possible to chain calls. E.g. <code>new LayoutConstraint().noGrid().gap().fill()</code>. */ public final LC maxHeight(String height) { setHeight(LayoutUtil.derive(getHeight(), null, null, ConstraintParser.parseUnitValue(height, false))); return this; }
appendBoundSize(lc.getHeight(), sb, false, asAPI);
BoundSize sz = isHor ? lc.getWidth() : lc.getHeight();
containerSize = isHor ? container.getWidth() : container.getHeight(); BoundSize cSz = isHor ? lc.getWidth() : lc.getHeight(); if (!cSz.isUnset()) containerSize = cSz.constrain(containerSize, getParentSize(container, isHor), container);
private void resetLinkValues(boolean parentSize, boolean compLinks) { Object lay = container.getLayout(); if (compLinks) LinkHandler.clearTemporaryBounds(lay); boolean defIns = !hasDocks(); int parW = parentSize ? lc.getWidth().constrain(container.getWidth(), getParentSize(container, true), container) : 0; int parH = parentSize ? lc.getHeight().constrain(container.getHeight(), getParentSize(container, false), container) : 0; int insX = LayoutUtil.getInsets(lc, 0, defIns).getPixels(0, container, null); int insY = LayoutUtil.getInsets(lc, 1, defIns).getPixels(0, container, null); int visW = parW - insX - LayoutUtil.getInsets(lc, 2, defIns).getPixels(0, container, null); int visH = parH - insY - LayoutUtil.getInsets(lc, 3, defIns).getPixels(0, container, null); LinkHandler.setBounds(lay, "visual", insX, insY, visW, visH, true, false); LinkHandler.setBounds(lay, "container", 0, 0, parW, parH, true, false); }