|
|
Contents |
GroupLayout (Free Design)The goal of the group layout manager is to make it easy to create professional cross platform layouts. It is designed for GUI builders, such as JFormDesigner, to use the "Free Design" paradigm. You can lay out your forms by simply placing components where you want them. Visual guidelines suggest optimal spacing, alignment and resizing of components.
GroupLayout has been developed by the NetBeans team and is also used by the NetBeans GUI Builder (formerly Project Matisse). They provide a comprehensive tutorial on designing GUIs using GroupLayout, which is also suitable for JFormDesigner: http://www.netbeans.org/kb/60/java/quickstart-gui.html GroupLayout is part of the
standard Java distribution since Java 6. If you need to run your
application also on Java 5 or 1.4, you can use the open-source Swing Layout Extension
library, which is compatible to the Java 6 GroupLayout, but uses
different package names. Change the option "GroupLayout Generation
Style" in the Layout
Managers (Java Code Generator) preferences if necessary. Alignment guidelinesAlignment guidelines appear only when adding or moving components. They indicate the preferred positions to which components snap when releasing the mouse button. Insets are the preferred spacings between components and their container.
Offsets are the preferred spacings between adjacent components.
Baseline alignment is the preferred relationship between adjacent components that display text.
Edge alignments (top, bottom, left and right) are possible relationships between adjacent components.
Indentation alignment is a special alignment relationship in which one component is located below another and offset slightly to the right.
Anchoring indicatorsAnchoring indicators appear when components have snapped into position. They illustrate the alignment and relationship among components.
Anchors connecting components to their container or to adjacent components are represented by small semi-circular indicators with dashed lines. CommandsThe designer context menu provides following GroupLayout specific commands:
Layout propertiesA container with this layout manager has following layout properties:
Constraints propertiesA component contained in a container with this layout manager has following constraints properties:
|
|||||||||||||||||||||||||||||||||||||||||||||