Dne 09. 10. 19 v 18:26 Bob Jacobsen napsal(a):
Layout comes from programmer definition, ZIMO decoder gives variable title working (i.e. various light stuff).
When looking on the outcome, I am tempted to wrap ZIMO's items into a titled pane (common label in the title, save words in control labels). BUT
- programmer definition can't assume similar wording of the placeholder items, since they can be, in fact, unrelated, or can be just a few of them to form a visual group,
- decoder can't influence the layout in this case, but "knows" it would be good to group them
Strange thing ! Someone has an idea how the decoder could provide "hint" for the layout templates ?
The presentation model of rows and columns was meant to allow people to pack pages simply. It doesn’t give really detailed layout tools, and the hope was that people would just accept simple, common layouts. But some of decoder definitions go beyond that to use tricks in their custom panes to i.e. align things between columns. Not sure what to do about that, it’ll be interesting to see what develops.I'm not sure that either. The tricks have to fail (IMHO) as they rely on presentation of a variable to be the same size as a text (label), which can't be guaranteed.
If some validation feedback elements step in (i.e. possible error will be displayed on next line), this assumption will break at all.
With GroupLayout, it is *possible* to skip intermediate panels (that are there just for grouping), which allows to glue components on a row, across columns. Maybe an extension hint element/attribute would be helpful to express the intent clearly (e.g. alignY='item-name-of-the-leader-component'; disallowing forward references).
I am not sure if this is doable with across JPanel levels with GridBag even if I somehow hacked the algorithm in a subclass.