Zooki Technologies Logo
Home Products Support

Java Component Development

ExplicitLayout 3.0
Overview
Features
System Requirements
Download
Screenshots
License Agreement
 

ExplicitLayout 3.0

Overview

Create sophisticated, adaptable and professional user interfaces. ExplicitLayout is a powerful layout manager for Java with a unique approach to defining resolution independent layouts for AWT, Swing or JavaBean components. ExplicitLayout gives the developer complete control over each component's resizing behaviour as the container size or application state changes. ExplicitLayout extends the JDK with a flexible, intuitive and extensible layout manager that facilitates the implementation of almost any component layout.

 

Features

ExplicitLayout is a constraints based layout manager that implements the java.awt.LayoutManager2 interface. It can be used to layout any container that extends java.awt.Container.

ExplicitLayout provides the following features:

Specify a component's location relative to:

  • An absolute position
  • The edges of the container (respecting the container insets)
  • A fraction of the width or height of the container
  • The edges of another component
  • A fraction of the width or height of another component
  • The edges of a group of components
  • A row and column of a grid
  • and more ...

Specify the location of any point on a component, not just the top left corner. This facilitates aligning component's left, center, right, top, middle or bottom.

Specify a component's size based on:

  • An absolute size
  • The preferred, minimum or maximum size of a component or components in a group
  • The size of the container (respecting the container insets)
  • A fraction of the size of the container
  • The size of another component or group
  • A fraction of the size of another component or group
  • The space between two components
  • The space to the edge of the container
  • A grid cell size
  • and more ...

Define whether a component's width or height is set to zero when the component is not visible. This provides some control over whether the layout is rearranged to fill the space left by an invisible component.

Modify layout constraints at runtime based on, for example, component visibility.

ExplicitLayout can be used alongside other layout managers by nesting containers. It enables the preferred, minimum and maximum size of the container to be defined based on the sizes of its components.

A LayoutListener can be notified just before layout to enable switching constraints based on container width / height ratio. This takes care of situations when it is difficult to define a single layout for a container that could be very wide and very tall.

Specify a component's location relative to a point on an ellipse or line. These features improve the ability to lay out less rectangular GUI's (e.g. with non-rectangular, transparent or overlapping components).

Load layout constraints from a properties file. Layout constraints can be defined in a properties file using Java Language strings similar to those used when defining the constraints in a class file. This allows layouts to be modified without recompiling and allows different variant layouts to be specified for a particular container. A different variant could be chosen depending on some state e.g. user preferences, user skill level, locale, or container width/height ratio. This also allows a program to modify its own layouts and store them in a file for use next time the program is run.

Load layout constraints from other sources. ExplicitLayout can easily be extended to load constraints from other sources, e.g. an XML file or a database.

Use the same layout definition for different containers. This can be useful when otherwise unrelated containers have similar layouts but possibly different or even optional components.

ExplicitLayout can easily be extended to support even more layout characteristics and maximise code reuse.

 

System Requirements

ExplicitLayout requires Java 2 or later.

 

Download

Please download explicit_3_0.zip (393 KB) and unzip to a directory of your choice. This zip file contains the ExplicitLayout JAR file (to include in your classpath), Source Code, Demonstration Application, Programmer's Guide, API Documentation.

 

Screenshots

Click on the thumbnails below to see the description, screenshot and source code for each example contained in the Demonstration Application.

Note: A screenshot can only show you a layout in a particular state. Many benefits of using ExplicitLayout involve the runtime behaviour of the layout when the container is resized or some change in state affects the size or location of the components. We recommend that you download the Demonstration Application to see the features of ExplicitLayout in action. All examples allow you to resize the container. The Component Visibility example allows you to toggle the visibility of components. The Ratio Trigger example has a more dramatic switch in the layout when the container width / height ratio changes from 'normal' to 'very wide'. The Properties example allows you to switch between layout variants or modify the layout at runtime.

Standard edition  
Center Screenshot Thumbnail
Align Screenshot Thumbnail
Simple Form Screenshot Thumbnail
Resizing Form Screenshot Thumbnail
Simple Grid Screenshot Thumbnail
Complex Grid Screenshot Thumbnail
Component Visibility Screenshot Thumbnail
Vertical Flow Screenshot Thumbnail
Container Fraction Screenshot Thumbnail
Preferred Ratio Screenshot Thumbnail
Professional edition  
Geometry Screenshot Thumbnail
Ratio Trigger Screenshot Thumbnail
Properties
(loading layout from)
Screenshot Thumbnail
Feedback Copyright © 2001 Zooki Technologies. All rights reserved.