fuin.org

Small Open Source Java Tools and Libraries

ScalableLayout

There is a nice zoom function included in Firefox: You can use CTRL+ and CTRL- to zoom in and out of a website. This is basically the same function for Swing applications.

Example video:
Flash video Internal link outside layout

Example usage (Single container):
// Registry of helper classes for scaling components and layouts.
ScalableLayoutRegistry scalerRegistry = new DefaultScalableLayoutRegistry();

// Install the layout on your container
ScalableLayoutUtils.installScalableLayout(scalerRegistry, aContainer);

Example usage (Multiple containers):
// Registry of helper classes for scaling components and layouts.
ScalableLayoutRegistry scalerRegistry = new DefaultScalableLayoutRegistry();

// Install the layout recursive on your container and it's children
ScalableLayoutUtils.installScalableLayoutRecursive(scalerRegistry, aContainer);

State:
Experimental Warning sign

Currently works with the following layouts:
  • Null (Absolute) Layout
  • Border Layout
  • Card Layout
  • Flow Layout
  • Gridbag Layout
  • JGoodies Layout

In progress:
  • Box Layout
  • Grid Layout
  • Spring layout