.comment-link {margin-left:.6em;}

October 24, 2005

 

Designing Visual Interfaces

Well, I was wrong about Matisse. The generated code is not human-editable.

It's been awhile, so I looked at both TableLayout and JGoodies FormsLayout again. See how I felt about them at this time.

Sadly, I'm not real fond of either. I like the idea of FormsLayout. But it doesn't go far enough. I want the LookAndFeel to specify the margins, gutters, and spacing between components, not me. That alone would simplify constuction.

For a while, I've been very interested in constraints-based specification of user interface layouts. Like SVG with Constraints.

SpringLayout is a step towards using purpose constraints. However, it's API doesn't embody how people contruct user interfaces. For us English speakers, we build layouts left-to-right, top-to-bottom. The last time I tried it out, I created some utility methods, like leftToRight( Component left, Component right ). It helped a bit. The next step was to make enhance the layout manager to automatically add gaps and margins between components. (But I switched jobs.)

Dissatisfied with the available solutions, I reviewed all my user interface design books again. To look for some wisdom.

Happily, Mullet and Sano's Designing Visual Interfaces: Communication Oriented Techniques has just the thing. They show and explain the use of canonical grids for layout. (My graphic artist friends confirm the use of grids is 101 level material.) This online book reproduces the canonical grid (figure #27, scroll up). Here's some class notes which reproduce the layout figures from the book (scroll to end of document).

I'm daydreaming about how to implement such a layout manager. Gods, I hate Swing's architectural separation of layout managers and components. The need for BoxLayout and Box instances pretty much proves my point.

Alas, I'm not currently working this new super duper layout manager. It turns out that fitting my current design problem into a forms based user interface isn't workable. There's just too much hierarchy. So I've reverted to that old standby, the tree control. The more things change...

But wait, there's more. I have an even crazier idea.

I've played around a bit with graph drawing and layout libraries. Here's a gallery of automatically drawn layouts.

Why not an algorithm for user interface layout? You'd link up your components, nodes and edges, just like with SpringLayout. Then identify the upper most, leftist most component. Then tell the layout manager to do it's magic. Add add invisible spacer boxes and such to tweak things.

That would be bitchin'.



Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?