Documentation
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.
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
in its
redistributables. 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 manager properties¶
A container with this layout manager has following layout manager properties:
Property Name | Description | Default |
---|---|---|
horizontal gap | The horizontal gap between components. If -1, then inherits gap from parent container that also uses IntelliJ IDEA GridLayout, or uses 10 pixels. | -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 pixels. | -1 |
same size horizontally | If true, all columns get the same width. | false |
same size vertically | If true, all rows get the same height. | false |
margin | Size of the margin between the containers border and its contents. | 0,0,0,0 |
Layout constraints properties¶
A component contained in a container with this layout manager has following layout constraints properties:
Property Name | Description | Default |
---|---|---|
grid x | Specifies the component's horizontal grid origin (column index). | 0 |
grid y | Specifies the component's vertical grid origin (row index). | 0 |
grid width | Specifies the component's horizontal grid extend (number of columns). | 1 |
grid height | Specifies the component's vertical grid extend (number of rows). | 1 |
fill | Specifies how the component fills its cell. Possible values: None, Horizontal, Vertical and Both. | 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. | Center |
indent | The indent of the component within its cell. In pixel multiplied by 10. | 0 |
align grid with parent | If true, align the grid of nested containers, which use IntelliJ IDEA GridLayout, with the grid of this container. | false |
horizontal size policy | Specifies how the component affects horizontal resizing behavior. Possible values: Fixed, Can Shrink, Can Grow, Want Grow and combinations. | 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. | Can Shrink and Can Grow |
minimum size | The minimum size of the component. | -1, -1 |
preferred size | The preferred size of the component. | -1, -1 |
maximum size | The maximum size of the component. | -1, -1 |