jtuchel wrote:the more I am facing the cross-(windows)-platform nightmare (see my question about fonts for XP and VISTA), the more I wonder whether it wouldn't be a great thing to have layout managers in VAST, which could help solve some issues like widget height differences between platforms.
With Layout managers I mean GridLayout etc, like they are in Swing or SWT.
The layout system used in VAST (attachments on each widget side) is basically the same as SWT FormLayout (which is basically just a Java port of the VAST system) and Swing SpringLayout. The layout system in VAST does actually solve the problem you identify as long as you don't over specify the constraints and use widget-to-widget attachments correctly. For example, if you fix only the top and left corners of a Button, its right side and bottom will adjust based on its text, font and font size (which is what you want in a multi-lingual, multi-resolution, multi-font application). If you place a second button next to the first and set its left side to be attached to the right side of the first, its position will adjust based on the size of the first button. To layout an entire form so that it will grow and shrink intelligently, you would typically begin by locking the widgets around the periphery to the margins of the window and then work inward using widget attachments.
Something like the SWT GridLayout might be a nice alternative as it simplifies some things (at the expense of others). Interestingly enough, the SWT GridLayout layout manager was originally developed in VAST for VA Java. Most of the VA Java wizards were built using GridLayout and that layout was later ported to Java for use with Eclipse. The main problem with GridLayout (which is a grid-based left-to-right wrapping layout with row and column spanning) is that it takes a lot of work to get right when laying things out manually. You also need to create invisible spacer widgets (usually empty Labels) for any cells in the grid that you want to keep blank. If you can plan ahead and know the exact number of columns you need, it can work out pretty well. Change the number of columns after the fact, and you have a real nightmare on your hands trying to readjust the flow of the grid. To really use GridLayout effectively, you need pretty sophisticated GUI builder support to automatically adjust all the grid column and row positions, invisible spacers, etc. As an example, you can take a look at the flash demo
of what we do in the Java version of WindowBuilder.