public final class BoundedSize extends Object implements Size, Serializable
Sizes,
ConstantSize,
Serialized Form| Constructor and Description |
|---|
BoundedSize(Size basis,
Size lowerBound,
Size upperBound)
Constructs a BoundedSize for the given basis using th
specified lower and upper bounds.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compressible()
Describes if this Size can be compressed, if container space gets scarce.
|
String |
encode()
Returns a parseable string representation of this bounded size.
|
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.
|
public BoundedSize(Size basis, Size lowerBound, Size upperBound)
basis - the base sizelowerBound - the lower bound sizeupperBound - the upper bound sizeNullPointerException - if basis, lowerBound
or upperBound is nullpublic Size getBasis()
null.public Size getLowerBound()
public Size getUpperBound()
public int maximumSize(Container container, List components, FormLayout.Measure minMeasure, FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure)
FormSpec to determine the size of a column o row.
maximumSize in interface Sizecontainer - the layout containercomponents - the list of components to measureminMeasure - the measure used to determine the minimum sizeprefMeasure - the measure used to determine the preferred sizedefaultMeasure - the measure used to determine the default sizeFormSpec.maximumSize(Container, List, FormLayout.Measure, FormLayout.Measure, FormLayout.Measure)public boolean compressible()
#compressedSizes
compressible in interface Sizetrue if and only if the basis is compressiblepublic boolean equals(Object object)
equals in class Objectobject - the object with which to comparetrue if this object is the same as the objec
argument, false otherwise.Object.hashCode(),
Hashtablepublic int hashCode()
java.util.Hashtable.hashCode in class ObjectObject.equals(Object),
Hashtablepublic String toString()
Note: This string representation may chang
at any time. It is intended for debugging purposes. For parsing
use encode() instead.
Copyright © 2002-2014 JGoodies Software GmbH. All Rights Reserved.