static final class Sizes.ComponentSize extends java.lang.Object implements Size, java.io.Serializable
Size interface for the component sizes:
min, pref, default.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name |
private static int |
nextOrdinal |
private int |
ordinal |
| Modifier | Constructor and Description |
|---|---|
private |
ComponentSize(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compressible()
Describes if this Size can be compressed, if container space gets scarce.
|
java.lang.String |
encode()
Returns a parseable string representation of this ComponentSize.
|
int |
maximumSize(java.awt.Container container,
java.util.List components,
FormLayout.Measure minMeasure,
FormLayout.Measure prefMeasure,
FormLayout.Measure defaultMeasure)
Computes the maximum size for the given list of components, using
this form spec and the specified measure.
|
private java.lang.Object |
readResolve() |
java.lang.String |
toString() |
(package private) static Sizes.ComponentSize |
valueOf(java.lang.String str)
Returns an instance of
ComponentSize that corresponds
to the specified string. |
private final transient java.lang.String name
private static int nextOrdinal
private final int ordinal
static Sizes.ComponentSize valueOf(java.lang.String str)
ComponentSize that corresponds
to the specified string.str - the encoded component sizepublic int maximumSize(java.awt.Container container,
java.util.List components,
FormLayout.Measure minMeasure,
FormLayout.Measure prefMeasure,
FormLayout.Measure defaultMeasure)
Invoked by FormLayout to determine the size of one of my elements
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 sizepublic boolean compressible()
#compressedSizes
to check whether a column or row can be compressed or not.The DEFAULT ComponentSize is compressible, MINIMUM and PREFERRED are incompressible.
compressible in interface Sizetrue for the DEFAULT size,
false otherwisepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String encode()
private java.lang.Object readResolve()