/** * Creates and returns a BoundedSize for the given basis * using the specified lower and upper bounds. * * @param basis the base size * @param lowerBound the lower bound size * @param upperBound the upper bound size * @return a <code>BoundedSize</code> for the given basis and bounds * @throws NullPointerException if {@code basis} is {@code null}, * or if both {@code lowerBound} and {@code upperBound} are {@code null}. */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
/** * Returns a string representation of this size object.<p> * * <strong>Note:</strong> This string representation may change * at any time. It is intended for debugging purposes. For parsing, * use {@link #encode()} instead. * * @return a string representation of this bounded size */ public String toString() { return encode(); }
/** * Describes if this Size can be compressed, if container space gets scarce. * Used by the FormLayout size computations in <code>#compressedSizes</code> * to check whether a column or row can be compressed or not.<p> * * BoundedSizes are compressible if the base Size is compressible. * * @return <code>true</code> if and only if the basis is compressible * * @since 1.1 */ public boolean compressible() { return getBasis().compressible(); }
/** * Describes if this Size can be compressed, if container space gets scarce. * Used by the FormLayout size computations in {@code #compressedSizes} * to check whether a column or row can be compressed or not.<p> * * BoundedSizes are compressible if the base Size is compressible. * * @return {@code true} if and only if the basis is compressible * * @since 1.1 */ @Override public boolean compressible() { return getBasis().compressible(); }
/** * Creates and returns a BoundedSize for the given basis * using the specified lower and upper bounds. * * @param basis the base size * @param lowerBound the lower bound size * @param upperBound the upper bound size * @return a {@code BoundedSize} for the given basis and bounds * @throws NullPointerException if {@code basis} is {@code null}, * or if both {@code lowerBound} and {@code upperBound} are {@code null}. */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
/** * Returns a string representation of this size object.<p> * * <strong>Note:</strong> This string representation may change * at any time. It is intended for debugging purposes. For parsing, * use {@link #encode()} instead. * * @return a string representation of this bounded size */ @Override public String toString() { return encode(); }
/** * Creates and returns a <code>BoundedSize</code> for the given basis * using the specified lower and upper bounds. * * @param basis * the base size * @param lowerBound * the lower bound size * @param upperBound * the upper bound size * @return a <code>BoundedSize</code> for the given basis and bounds * @throws NullPointerException * if basis is null */ public static Size bounded(Size basis, Size lowerBound, Size upperBound) { return new BoundedSize(basis, lowerBound, upperBound); }
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
return new BoundedSize(size2, setMax ? null : size1, setMax ? size1 : null); return new BoundedSize(size1, setMax ? null : size2, setMax ? size2 : null);
&& ((lower == null) || (isConstant(lower))) && ((upper == null) || (isConstant(upper)))) { return new BoundedSize(basis, lower, upper);
return new BoundedSize(basis, lower, upper);