in all of our layout panes we do check for min/pref/max size (I think),
but strictly speaking they are all just size hints so I can imagine a
layout pane which would not check for these and compute the size of the
child in some different way. On the other hand, the size hints, esp. min
size gives an information about the minimum size of the Node with which
is the Node "usable".
But to be safe, you should always check for validity of your cached
calculations in all compute* methods + at the beginning of layoutChildren().
On 2.4.2014 16:34, Tom Eugelink wrote:
I'm currently working on a circular pane and am in the phase of
writing tests. For optimalisation the layout does some (cached)
calculations in the computePrefWidth, because, after all, how can a
node be laid out if its container does not know what its min and pref
sizes are? This works perfectly for all the trials I've written,
putting the pane directly into the scene, or part of other panes.
But in the test (using TestFX) the layoutChildren() is called without
ever calling computeMin/PrefWidth... Does that make sense?