/** 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; }
/** 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>setAlignY(ConstraintParser.parseUnitValueOrAlign(align, false))</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 LayoutConstraint().noGrid().gap().fill()</code>. * @see #setAlignY(UnitValue) */ public final LC alignY(String align) { setAlignY(ConstraintParser.parseUnitValueOrAlign(align, false, null)); return this; }
/** Same functionality as <code>setAlignX(ConstraintParser.parseUnitValueOrAlign(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 LayoutConstraint().noGrid().gap().fill()</code>. * @see #setAlignX(UnitValue) */ public final LC alignX(String align) { setAlignX(ConstraintParser.parseUnitValueOrAlign(align, true, null)); return this; }
ix = startsWithLenient(part, new String[]{"aligny", "ay"}, new int[]{6, 2}, true); if (ix > -1) { UnitValue align = parseUnitValueOrAlign(part.substring(ix).trim(), false, null); if (align == UnitValue.BASELINE_IDENTITY) throw new IllegalArgumentException("'baseline' can not be used to align the whole component group."); lc.setAlignX(parseUnitValueOrAlign(part.substring(ix).trim(), true, null)); continue; if (ix > -1) { String[] gaps = toTrimmedTokens(part.substring(ix).trim(), ' '); lc.setAlignX(parseUnitValueOrAlign(gaps[0], true, null)); if (gaps.length > 1) { UnitValue align = parseUnitValueOrAlign(gaps[1], false, null); if (align == UnitValue.BASELINE_IDENTITY) throw new IllegalArgumentException("'baseline' can not be used to align the whole component group.");
if (ix > -1) { dimConstraint.setAlign(parseUnitValueOrAlign(part.substring(ix).trim(), isCols, null)); continue;
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;