Skip to end of metadata
Go to start of metadata

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
[FormLayout]

columns

ColumnSpec[]

 

(tick)

(error)

either set a value for this property or set a value for the node

 

rows

RowSpec[]

 

(error)

(error)

either set a value for this property or set a value for the node

cc
[CellConstraints]

x

int

1

(error)

(error)

 

 

y

int

1

(error)

(error)

 

 

w

int

1

(error)

(error)

 

 

y

int

1

(error)

(error)

 

 

halign

String

 

(error)

(error)

must define a value for valign too

 

valign

String

 

(error)

(error)

must define a value for halign too

 

align

String

 

(error)

(error)

combined halign/valign

form
[JPanel]

layout

FormLayout

 

(tick)

(error)

either set a value for this property or set a value for the node

 

target

JPanel

 

(error)

(error)

either set a value for this property or set a value for the node

 

resourceBundle

ResourceBundle

 

(error)

(error)

 

Nodes and properties accept different types according to the following rules
formLayout node value may be any of

  • a FormLayout instance
  • 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 JPanel instance - must define a value for layout:
  • a FormLayout instance - will use default JPanel unless target: 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 FormLayout instance
  • 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

  • No labels