Description
JGoodies Forms is one of Swing's most well known 3rd party libraries. It provides a very powerful grid-based layout: FormLayout.
Installation
The current version of griffon-jgoodies-forms-plugin is 0.4
To install just issue the following command
Usage
The following nodes will become available on a View script upon installing this plugin
Node |
Property |
Type |
Default |
Required |
Bindable |
Notes |
|---|---|---|---|---|---|---|
formLayout |
columns |
ColumnSpec[] |
|
either set a value for this property or set a value for the node |
||
|
rows |
RowSpec[] |
|
either set a value for this property or set a value for the node |
||
cc |
x |
int |
|
|
||
|
y |
int |
|
|
||
|
w |
int |
|
|
||
|
y |
int |
|
|
||
|
halign |
String |
|
must define a value for |
||
|
valign |
String |
|
must define a value for |
||
|
align |
String |
|
combined halign/valign |
||
form |
layout |
FormLayout |
|
either set a value for this property or set a value for the node |
||
|
target |
JPanel |
|
either set a value for this property or set a value for the node |
||
|
resourceBundle |
ResourceBundle |
|
|
Nodes and properties accept different types according to the following rules
formLayout node value may be any of
- a
FormLayoutinstance - a String/GString - only columnSpec will be defined
- a String[] - element[0] will be columnSpec, element[1] will be rowSpec
- a List - element[0] will be columnSpec, element[1] will be rowSpec
formLayout.columns: may be any of
- ColumnSpec[]
- String/GString
- List - elements will be joined with ","
formLayout.rows: may be any of
- RowSpec[]
- String/GString
- List - elements will be joined with ","
form node value may be any of
- a
JPanelinstance - must define a value forlayout: - a
FormLayoutinstance - will use default JPanel unlesstarget:is defined - a String/GString - columnSpec will be used only. Will use default JPanel unless
target:is defined - a String[] - element[0] will be columnSpec, element[1] will be rowSpec. Will use default JPanel unless
target:is defined - a List - element[0] will be columnSpec, element[1] will be rowSpec. Will use default JPanel unless
target:is defined
form.layout: may be any of
- a
FormLayoutinstance - a String/GString - only columnSpec will be defined
- a String[] - element[0] will be columnSpec, element[1] will be rowSpec
- a List - element[0] will be columnSpec, element[1] will be rowSpec
Additionally, you may call any method of DefualtFormBuilder inside form's child closure. Here is an example
That code produces the following screen

History
Version |
Date |
Notes |
|---|---|---|
0.4 |
02-14-11 |
Release sync with Griffon 0.9.2 |
0.3 |
07-22-10 |
Release sync with Griffon 0.9 |
0.2 |
03-01-10 |
Upgraded to Griffon 0.3 |
0.1 |
09-22-09 |
first release |


