/** Returns the creation string for this object. Note that {@link LayoutUtil#setDesignTime(ContainerWrapper, boolean)} must be * set to <code>true</code> for the creation strings to be stored. * @return The constraint string or <code>null</code> if none is registered. */ public final String getConstraintString() { return LayoutUtil.getCCString(this); }
/** Returns the a constraint string that can be re-parsed to be the exact same UnitValue. * @return A String. Never <code>null</code>. */ String getConstraintString() { String cs = LayoutUtil.getCCString(this); if (cs != null) return cs; if (min == pref && pref == max) return min != null ? (min.getConstraintString() + "!") : "null"; StringBuilder sb = new StringBuilder(16); if (min != null) sb.append(min.getConstraintString()).append(':'); if (pref != null) { if (min == null && max != null) sb.append(":"); sb.append(pref.getConstraintString()); } else if (min != null) { sb.append('n'); } if (max != null) sb.append(sb.length() == 0 ? "::" : ":").append(max.getConstraintString()); if (gapPush) { if (sb.length() > 0) sb.append(':'); sb.append("push"); } return sb.toString(); }
String cs = LayoutUtil.getCCString(insets); if (cs != null) { if (asAPI) {