|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.miginfocom.layout.BoundSize
public class BoundSize
A size that contains minimum, preferred and maximum size of type UnitValue
.
This class is a simple value container and it is immutable.
If a size is missing (i.e., null
) that boundary should be considered "not in use".
You can create a BoundSize from a String with the use of ConstraintParser.parseBoundSize(String, boolean, boolean)
Field Summary | |
---|---|
static BoundSize |
NULL_SIZE
|
static BoundSize |
ZERO_PIXEL
|
Constructor Summary | |
---|---|
BoundSize(UnitValue minMaxPref,
java.lang.String createString)
Constructor that use the same value for min/preferred/max size. |
|
BoundSize(UnitValue min,
UnitValue preferred,
UnitValue max,
boolean gapPush,
java.lang.String createString)
Constructor. |
|
BoundSize(UnitValue min,
UnitValue preferred,
UnitValue max,
java.lang.String createString)
Constructor. |
Method Summary | |
---|---|
int |
constrain(int size,
float refValue,
ContainerWrapper parent)
Makes sure that size is within min and max of this size. |
boolean |
getGapPush()
If the size should be hinted as "pushing" and thus want to occupy free space if noone else is claiming it. |
UnitValue |
getMax()
Returns the maximum size as sent into the constructor. |
UnitValue |
getMin()
Returns the minimum size as sent into the constructor. |
UnitValue |
getPreferred()
Returns the preferred size as sent into the constructor. |
boolean |
isUnset()
Returns if this bound size has no min, preferred and maximum size set (they are all null ) |
protected java.lang.Object |
readResolve()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BoundSize NULL_SIZE
public static final BoundSize ZERO_PIXEL
Constructor Detail |
---|
public BoundSize(UnitValue minMaxPref, java.lang.String createString)
minMaxPref
- The value to use for min/preferred/max size.createString
- The string used to create the BoundsSize.public BoundSize(UnitValue min, UnitValue preferred, UnitValue max, java.lang.String createString)
ConstraintParser.parseBoundSize(String, boolean, boolean)
instead.
min
- The minimum size. May be null
.preferred
- The preferred size. May be null
.max
- The maximum size. May be null
.createString
- The string used to create the BoundsSize.public BoundSize(UnitValue min, UnitValue preferred, UnitValue max, boolean gapPush, java.lang.String createString)
ConstraintParser.parseBoundSize(String, boolean, boolean)
instead.
min
- The minimum size. May be null
.preferred
- The preferred size. May be null
.max
- The maximum size. May be null
.gapPush
- If the size should be hinted as "pushing" and thus want to occupy free space if no one else is claiming it.createString
- The string used to create the BoundsSize.Method Detail |
---|
public final UnitValue getMin()
null
.public final UnitValue getPreferred()
null
.public final UnitValue getMax()
null
.public boolean getGapPush()
public boolean isUnset()
null
)
public int constrain(int size, float refValue, ContainerWrapper parent)
size
is within min and max of this size.
size
- The size to constrain.refValue
- The reference to use for relative sizes.parent
- The parent container.
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |