FormLayout class that implements an constraint-based layout manager. With constraint-based layout, you have independent control over the sizing behavior of each of the four sides of a widget. The top, bottom, left, and right sides can be independently attached to the sides of the parent container or the sides of any sibling widget within the same container using either fixed or relative offsets. This proves to be surprisingly powerful and can be used to emulate almost any of the other layout managers. The FormLayout class is very simple and only specifies the margins of the container. The real power is in the FormData object, which holds up to four different FormConstraint objects.

In Automatic Mode, attachments are determined automatically based on the position of the widgets themselves. In Classic mode, full control over the attachments on each widget side is available.

Main Features

  • Select FormLayout from the Layouts palette and drop it on a Window or Composite

image

  • Graphical feedback is provided for all widget size and position operations

image image

  • Support for Automatic Placement mode and Classic mode.

image image

Graphical Feedback

  • Position and size widgets using FormLayout constraints

image image

  • Align widgets horizontally and vertically

image image

  • Indent widgets intelligently

image image

  • Align widgets to margins

image image

image

  • Anchor widgets to the left, right or both sides

image image

image image

  • Anchor widgets to the top, bottom or both sides

image image

image image

  • Align widgets to percentage offsets

image image

image image

  • Set anchors via popup context menus

image image

image image

  • Set anchors and offsets via the Property Pane

image

  • Align and center widgets using toolbar

image

  • Set anchors and alignment using floating layout assistant mage:images/assistant.gif[image]

image image