Blocks :
|
|
Relates :
|
|
Relates :
|
The min/max policy for sizing children in Region is enforced with calls like boundedSize(child.prefWidth(h), child.minWidth(h), child.maxWidth(h)). This policy states that if min > max, then min wins. This makes sense if both min and max are computed, or if both are set explicitly. There is one use case, however, where an application might set an explicit max, but not a min. In this case the max loses out if the computed min is larger, which seems wrong. I suggest that methods such as Region.computeChildPrefAreaWidth() takes this into account and calls boundedSize(child.prefWidth(h), child.maxWidth(h), child.maxWidth(h)) IFF (child.getMinWidth() < 0 && child.getMaxWidth() >= 0). There is a problem in that the getMin/MaxWidth/Height methods are defined in the Control class and is not accessible from Region. Another possibility might be to modify Control.getMinWidth/Height methods to return the max value in this particular case.
|