/** Same functionality as <code>getVertical().setAlign(ConstraintParser.parseUnitValue(unitValue, true))</code> only this method * returns <code>this</code> for chaining multiple calls. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param align The align keyword or for instance "100px". E.g "top" or "bottom". * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. */ public final CC alignY(String align) { ver.setAlign(ConstraintParser.parseUnitValueOrAlign(align, false, null)); return this; }
/** Same functionality as <code>getHorizontal().setAlign(ConstraintParser.parseUnitValue(unitValue, true))</code> only this method * returns <code>this</code> for chaining multiple calls. * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param align The align keyword or for instance "100px". E.g "left", "right", "leading" or "trailing". * @return <code>this</code> so it is possible to chain calls. E.g. <code>new ComponentConstraint().noGrid().gap().fill()</code>. */ public final CC alignX(String align) { hor.setAlign(ConstraintParser.parseUnitValueOrAlign(align, true, null)); return this; }
/** Specifies the indicated rows'/columns' columns default alignment <b>for its components</b>. It does not affect the positioning * or size of the columns/row itself. For columns it is the horizontal alignment (e.g. "left") and for rows it is the vertical * alignment (e.g. "top"). * <p> * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. * @param side The default side to align the components. E.g. "top" or "left", or "before" or "after" or "bottom" or "right". * @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 align(String side, int... indexes) { UnitValue al = ConstraintParser.parseAlignKeywords(side, true); if (al == null) al = ConstraintParser.parseAlignKeywords(side, false); for (int i = indexes.length - 1; i >= 0; i--) { int ix = indexes[i]; makeSize(ix); cList.get(ix).setAlign(al); } return this; }
ix = startsWithLenient(part, new String[]{"aligny", "ay"}, new int[]{6, 2}, true); if (ix > -1) { cc.getVertical().setAlign(parseUnitValueOrAlign(part.substring(ix).trim(), false, null)); continue; cc.getHorizontal().setAlign(parseUnitValueOrAlign(part.substring(ix).trim(), true, null)); continue; if (ix > -1) { String[] gaps = toTrimmedTokens(part.substring(ix).trim(), ' '); cc.getHorizontal().setAlign(parseUnitValueOrAlign(gaps[0], true, null)); if (gaps.length > 1) cc.getVertical().setAlign(parseUnitValueOrAlign(gaps[1], false, null)); continue; cc.getHorizontal().setAlign(horAlign); continue; cc.getVertical().setAlign(verAlign); continue;