Springs And Struts

The Visix Galaxy project was a ridiculously overpriced and overfeatured portable GraphicalUserInterface. You could do things like swivel an entire panel full of their custom widgets 32 degrees clockwise, and it would render all its text at this new angle without jaggies. The company went out of business after gaining only a handful of customers. For USD$ 10,000 a seat they sure didn't see the OpenSource movement coming. Their last attempt before going under was (guess what?) a Java IDE.

The GUI featured a unique and useful GeometryManager. You declared a form full of widgets as if each border could have a strut or a spring connecting it to any other border. A spring pushed borders such that all springs parallel to an axis balanced their forces when you resized the form. A strut kept a border at a fixed distance.

Here's how to center a fixed size field in a variable sized window. First you fix the field's size by applying horizontal and vertical struts to its opposing borders. Then you center it by applying four springs from its borders to the four walls of the window. Release the field, and it snaps into place.

This GeometryManager alone would have been worth the price of admission to Galaxy. If the price hadn't been so damn high!

The NextStep (and now MacOsx) InterfaceBuilder tool has a similar feature too, but not as powerful as the Galaxy model. The InterfaceBuilder model just has spings/struts relative to the borders of the windows, not individual objects, so you can't e.g. have one object base its width or height based on another object dynamically.

The also-now-defunct PlatinumTechnology? and its CCC/Harvest (which it bought from some other company, no doubt) used Visix Galaxy. Most of the GUI for CCC/Harvest was inconsistent and generally bad, but it did use the Galaxy GeometryManager. In fact, the GeometryManager was the only thing about Harvest that I really liked, and I had a "Wow, cool!" experience when I saw it. -- SusanHoover (ex-PLAT)

Oddly enough, I saw a Swing layout manager exactly like the one described here demonstrated at JavaOne in June of 2000. I thought it was a nifty idea -- a bit complex for common use but better than GridBagLayout if you really need a complex GUI. The demonstration showed how to easily create the sort of parallel selection lists with a selector in the middle allowing items to be moved back and forth between the lists that you see in a lot of applications, for example the Select Names dialog for choosing addresses when composing email in Outlook. -- StevenNewton

It's called SpringLayout? and part of jdk1.4. It can emulate all the other layout managers.

View edit of February 24, 2011 or FindPage with title or text search