cs349 - s10 - Lecture 24

CS349 - Implementing User Interfaces - Spring 2010

Public Service Annoucements


Lecture 24 - Graphic Design & Layout Managers

Layout in the Twentieth Century

Wildly oversimplifying, there were two layout revolutions in the twentieth century.

  1. Assymmetric (1920)
  2. Symmetric (1950)

Oddly, both were invented by the same man, Jan Tschichold.

There looks like being a third revolution in the early twenty-first century.

  1. Packed

Tschichold would not approve. Why?

How does white space work?

  1. Separation
  2. Common features, which means edges and symmetry axes
  3. Rhythm

None of this helps very much in separating layout from content.

We saw that this has usually been done by creating a collection of template pages.

Layout Managers: Java/Swing

Here are two layout types that do something like what TeX does

FlowLayout

BoxLayout

which can be horizontal or vertical

With box layout you can do anything. But some things are hard

Grid layout

GridBag layout

Other things you might want to do with layout

Border layout

ScrollPanel layout

We have now seen the main set of layouts.

Layout Managers

Layout Manager is a property of a container. It takes

  1. a layout policy
  2. high level constraints, like window size
  3. interface widgets
  4. low level constraints, like minimum widget size

and decides where to put the widgets in the window.

A simple example: BoxLayout

What it does:

How you use it:

An important innovation to notice

Layout is based on areas, not on guide lines


Return to: