/** Grow weight for the component vertically. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param w The new grow weight. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. */ public final CC growY(float w) { ver.setGrow(w); return this; }
dimConstraint.setGrow(parseFloat(part.substring(ix).trim(), ResizeConstraint.WEIGHT_100)); continue;
ix = startsWithLenient(part, "growx", 5, true); if (ix > -1) { cc.getHorizontal().setGrow(parseFloat(part.substring(ix).trim(), ResizeConstraint.WEIGHT_100)); continue; cc.getVertical().setGrow(parseFloat(part.substring(ix).trim(), ResizeConstraint.WEIGHT_100)); continue; if (ix > -1) { String[] grows = toTrimmedTokens(part.substring(ix).trim(), ' '); cc.getHorizontal().setGrow(parseFloat(grows[0], ResizeConstraint.WEIGHT_100)); cc.getVertical().setGrow(parseFloat(grows.length > 1 ? grows[1] : "", ResizeConstraint.WEIGHT_100)); continue; cc.getHorizontal().setGrow(100f); cc.getVertical().setGrow(100f); cc.setPushX(100f); cc.setPushY(100f);
/** Grow weight for the component horizontally. It default to weight <code>100</code>. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. * @see #growX(float) */ public final CC growX() { hor.setGrow(ResizeConstraint.WEIGHT_100); return this; }
/** Grow weight for the component vertically. Defaults to <code>100</code>. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. * @see #growY(Float) */ public final CC growY() { ver.setGrow(ResizeConstraint.WEIGHT_100); return this; }
/** Grow weight for the component horizontally. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param w The new grow weight. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. */ public final CC growX(float w) { hor.setGrow(new Float(w)); return this; }
/** Grow weight for the component vertically. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param w The new grow weight. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. */ @Deprecated public final CC growY(Float w) { ver.setGrow(w); return this; }
/** Specifies the indicated rows'/columns' grow weight within columns/rows with the same <code>grow priority</code>. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param w The new grow weight. * @param indexes The index(es) (0-based) of the columns/rows that should be affected by this constraint. * @return <code>this</code> so it is possible to chain calls. E.g. <code>new AxisConstraint().noGrid().gap().fill()</code>. */ public final AC grow(float w, int... indexes) { Float gw = new Float(w); for (int i = indexes.length - 1; i >= 0; i--) { int ix = indexes[i]; makeSize(ix); cList.get(ix).setGrow(gw); } return this; }