MeasurePolicy
How a container measures and places its children.
A policy is handed one Measurable per child and the Constraints the container was given, measures each child under constraints of its own working out, and answers with the extent it occupies and the placement of what it measured.
Functions
The height beyond which growing measurables no longer reduces their width at width.
The width beyond which growing measurables no longer reduces their height at height.
Measures measurables under constraints and answers the extent this container occupies, along with where each measured child goes inside it.
Measures measurables for the container's assigned inner bounds width by height, and returns where each measured child goes. A Swing parent that sets the container's bounds, or the container laying itself out, calls this; a Foundation parent calls measure. width and height exclude the container's insets and paint outsets. They are the container's own size, not an offer to its children: an override can offer its children any constraints and still return layout(width, height). Like measure, it measures each child at most once. The default calls measure with exact constraints for width and height.
The smallest height that lets measurables paint correctly when they are width wide.
The smallest width that lets measurables paint correctly when they are height tall.
Returns the preferred size of this container for Swing's getPreferredSize(). assignedWidth is the inner width Swing has set on the container, or null where it has no positive width to offer, which includes every container under a Foundation parent; use it for height-for-width. The result excludes insets and paint outsets, which the container adds, and must be nonnegative, or getPreferredSize() throws IllegalArgumentException. Minimum size reads do not call this; they use the minimum intrinsic functions.