com.jgoodies.forms.layout
public final class BoundedSize extends Object implements Size, Serializable
Version: $Revision: 1.9 $
See Also: Sizes ConstantSize
Constructor Summary | |
---|---|
BoundedSize(Size basis, Size lowerBound, Size upperBound)
Constructs a BoundedSize for the given basis using the
specified lower and upper bounds.
TODO: Consider throwing an IllegalArgumentException,
if the lower bound and upper bound are both |
Method Summary | |
---|---|
boolean | compressible()
Describes if this Size can be compressed, if container space gets scarce.
|
boolean | equals(Object object)
Indicates whether some other BoundedSize is "equal to" this one.
|
Size | getBasis()
Returns the base size, which is not- null .
|
Size | getLowerBound()
Returns the optional lower bound.
|
Size | getUpperBound()
Returns the optional upper bound.
|
int | hashCode()
Returns a hash code value for the object. |
int | maximumSize(Container container, List components, FormLayout.Measure minMeasure, FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure)
Returns this size as pixel size. |
String | toString()
Returns a string representation of this size object.
|
TODO: Consider throwing an IllegalArgumentException,
if the lower bound and upper bound are both null
.
Parameters: basis the base size lowerBound the lower bound size upperBound the upper bound size
Throws: NullPointerException if the basis is null
Since: 1.1
#compressedSizes
to check whether a column or row can be compressed or not.BoundedSizes are compressible if the base Size is compressible.
Returns: true
if and only if the basis is compressible
Since: 1.1
Parameters: object the object with which to compare
Returns: true
if this object is the same as the object
argument, false
otherwise.
See Also: Object#hashCode() java.util.Hashtable
null
.
Returns: the base size
Since: 1.1
Returns: the optional lower bound
Since: 1.1
Returns: the optional upper bound
Since: 1.1
java.util.Hashtable
.
Returns: a hash code value for this object.
See Also: Object#equals(Object) java.util.Hashtable
Invoked by FormSpec
to determine the size of a column or
row.
Parameters: container the layout container components the list of components to measure minMeasure the measure used to determine the minimum size prefMeasure the measure used to determine the preferred size defaultMeasure the measure used to determine the default size
Returns: the maximum size in pixels
See Also: FormSpec
Returns: a string representation of the constant size