Documentation

Contents

 

IntelliJ IDEA GridLayout

The IntelliJ IDEA grid layout manager places components in a grid of columns and rows, allowing specified components to span multiple columns or rows. Not all columns/rows necessarily have the same width/height.

Note: The IntelliJ IDEA grid layout manager is supported to make it easier to migrate forms, which were created with IntelliJ IDEA's GUI builder. If you never used it, it is recommended to use one of the other grid-based layout managers.

IntelliJ IDEA GridLayout

Use the column and row headers to insert or delete columns/rows and change column/row properties. Use horizontal and vertical spacers, which are available in the Palette, to define space between components.

IntelliJ IDEA GridLayout is open source and not part of the standard Java distribution. You must ship an additional library with your application. JFormDesigner includes intellij_forms_rt.jar and intellij_forms_rt_src.zip in its redist folder. For more documentation and tutorials, visit www.jetbrains.com/idea/.

IDE plug-ins: If you use IntelliJ IDEA GridLayout the first time, the JFormDesigner IDE plug-in ask you whether it should copy the required library (and its source code) to the IDE project and add it to the classpath of the IDE project.

Layout properties

A container with this layout manager has following layout properties:

Property Name Description
horizontal gap The horizontal gap between components. If -1, then inherits gap from parent container that also uses IntelliJ IDEA GridLayout, or uses 10 pixel. Default is -1.
vertical gap The vertical gap between components. If -1, then inherits gap from parent container that also uses IntelliJ IDEA GridLayout, or uses 5 pixel. Default is -1.
same size horizontally If true, all columns get the same width. Default is false.
same size vertically If true, all rows get the same height. Default is false.
margin Size of the margin between the containers border and its contents. Default is 0, 0, 0, 0.

Constraints properties

A component contained in a container with this layout manager has following constraints properties:

Property Name Description
grid x Specifies the component's horizontal grid origin (column index).
grid y Specifies the component's vertical grid origin (row index).
grid width Specifies the component's horizontal grid extend (number of columns). Default is 1.
grid height Specifies the component's vertical grid extend (number of rows). Default is 1.
fill Specifies how the component fills its cell. Possible values: None, Horizontal, Vertical and Both. Default is None.
anchor Specifies how the component is aligned within its cell. Possible values: Center, North, North East, East, South East, South, South West, West and North West. Default is Center.
indent The indent of the component within its cell. In pixel multiplied by 10. Default is 0.
align grid with parent If true, align the grid of nested containers, which use IntelliJ IDEA GridLayout, with the grid of this container. Default is false.
horizontal size policy Specifies how the component affects horizontal resizing behavior. Possible values: Fixed, Can Shrink, Can Grow, Want Grow and combinations. Default is Can Shrink and Can Grow.
vertical size policy Specifies how the component affects vertical resizing behavior. Possible values: Fixed, Can Shrink, Can Grow, Want Grow and combinations. Default is Can Shrink and Can Grow.
minimum size The minimum size of the component. Default is -1, -1.
preferred size The preferred size of the component. Default is -1, -1.
maximum size The maximum size of the component. Default is -1, -1.

« previous | next »