CookFormLayout Reference: Tags


 

 

Support This Project

 

stats counter

 

Logo SourceForge.net Logo IntelliJ IDEA

Tags

Basic FormLayout

FormBuilder

Children of FormBuilder

Others


formlayout

Class: com.jgoodies.forms.layout.FormLayout

Attribute Possible values Description
columnspec   It corresponds to the ColumnSpec[] parameter of the FormLayout constructor
rowspec   It corresponds to the RowSpec[] parameter of the FormLayout constructor
Child Description
<cellconstraints> Specify the CellConstraints used to add a component.
<form-columngroup> Specify a column group in the FormLayout.
<form-rowgroup> Specify a row group in the FormLayout.
<form-separator> Adds a separator to the FormLayout.

cellconstraints

Class: com.jgoodies.forms.layout.CellConstraints

Attribute Possible values Description
value   See the constructor of CellConstraints. This is a quick way of specifying the contraints
gridx   one of the fields of CellConstraints that can be set individually.
gridy   one of the fields of CellConstraints that can be set individually.
gridwidth   one of the fields of CellConstraints that can be set individually.
gridheight   one of the fields of CellConstraints that can be set individually.
halign   one of the fields of CellConstraints that can be set individually.
valign   one of the fields of CellConstraints that can be set individually.
insets   one of the fields of CellConstraints that can be set individually.
xy   same as calling CellConstraints.xy (...)
xyw   same as calling CellConstraints.xyw (...)
xywh   same as calling CellConstraints.xywh (...)

form-columngroup

Attribute Possible values Description
columns   A list of columns separated by ","

Note that only one column group is added per tag.


form-rowgroup

Attribute Possible values Description
rows   A list of rows separated by ","

Note that only one row group is added per tag.


panelbuilder

Class: com.jgoodies.forms.builder.PanelBuilder

Child Description
<formlayout> Specify the FormLayout to be used with this Builder. Must be the first child of the element.
component Any components can be a child of the PanelBuilder using the default CellConstraints.
<form-properties> Obtain the actual AbstractFormBuilder internally used so that its attributes can be set.
<form-append> Used to append row or column specs.
<form-separator> Create a separator.
<form-label> Insert a label component.
<form-title> Add a titledborder to the panel.
<form-nextline> Calls the AbstractBuilder.nextLine () function.
<form-nextcolumn> Calls the AbstractBuilder.nextColumn () function.

formbuilder

Inherited from tag: panelbuilder

Class: com.jgoodies.forms.builder.PanelBuilder

Child Description
component Append the component.

Although <formbuilder> use the same set of child tags as <panelbuilder>, the behaviors of these tags are quite different.


buttonbarbuilder

Class: com.jgoodies.forms.builder.ButtonBarBuilder

Child Description
<form-add> A way to add a component using the Builder with control over the size of the component.
<form-gap> A way to add a related/unrelated gap.
<form-glue> A way to add a glue that fills extra spaces.
<form-properties> Obtain the actual AbstractFormBuilder internally used so that its attributes can be set.
<form-strut> Add a fixed sized strut to the panel.

buttonstackbuilder

Class: com.jgoodies.forms.builder.ButtonStackBuilder

Child Description
<form-add> A way to add a component using the Builder with control over the size of the component.
<form-gap> A way to add a related/unrelated gap.
<form-glue> A way to add a glue that fills extra spaces.
<form-strut> Add a fixed sized strut to the panel.

form-properties

This tag obtains the actual AbstractFormBuilder used internally so that its properties can be set.

Attribute Possible values Description
Under <panelbuilder>
column   Sets the cursor to the given column.
columnspan   Sets the cursor's column span.
halignment   Sets the horizontal alignment.
leftoright   Sets the form fill direction to left-to-right or right-to-left.
origin x,y Sets the cursor's origin to the given column and row.
row   Sets the cursor to the given row.
rowspan   Sets the cursor's row span.
valignment   Sets the vertical alignment.
Under <formbuilder> additional attributes
leadingcolumnoffset   Sets the offset of the leading column, often 0 or 1.
linegapsize   One of the constant values in com.jgoodies.forms.layout.Sizes. Sets the size of gaps between component lines using the given constant size.
paragraphgapsize   One of the constant values in com.jgoodies.forms.layout.Sizes. Sets the size of gaps between paragraphs using the given constant size.
rowgroupingenabled   Enables or disables the grouping of new data rows.
Under <buttonbarbuilder>
lefttorightbuttonorder   Sets the order for button sequences to either left to right, or right to left.

form-append

This tag is used to append various row/column settings.

Attribute Possible values Description
column glue Same as calling appendGlueColumn ().
column labelcomponentsgap Same as calling appendLabelComponentsGapColumn ().
column relatedcomponentsgap Same as calling appendRelatedComponentsGapColumn ().
column unrelatedcomponentsgap Same as calling appendUnrelatedComponentsGapColumn ().
column columnspec Same as calling appendColumn (columnspec).
row glue Same as calling appendGlueRow ().
row linegap Same as calling appendRow (getLineGapSpec ()). Available only if the parent tag is <formbuilder>.
row paragraphgap Same as calling appendParagraphGapRow ().
row relatedcomponentsgap Same as calling appendRelatedComponentsGapRow ().
row unrelatedcomponentsgap Same as calling appendUnrelatedComponentsGapRow ().
row rowspec Same as calling appendRow (rowspec).

form-separator

This tag is used to append a separator component generated by ComponentFactory.

Attribute Possible values Description
text   The text label of the separator. If no other attributes are set and the parent tag is <formbuilder>, Then DefaultFormBuilder's appendSeparator (text) is called to generate the separator.
cellconstraints   Sets the CellConstraints used to add the separator.
Under <panelbuilder> and <formbuilder>
columnspan   Sets the column span of the separator.
Under <formlayout>
alignment   Sets alignment of the label. Default is LEFT.

form-label

This tag is used to add a label and its associated component to the <panelbuilder> or <formbuilder>. One advantage of using this tag is not only making it easier to specify the constraints, it also allows easy association of the label with the component.

This tag can add the label alone w/o the component, and in case the parent is <formbuilder>, the component can be added alone w/o the label. Essentially, this tag is useful for specifying contraints.

Attribute Possible values Description
text   The text label. Can be optional if the parent is <formbuilder>.
Under <panelbuilder> and <formbuilder>
labelconstraints cellconstraints The CellConstraint for the label.
componentconstraints cellconstraints The CellConstraint for the component.
Under <formbuilder> additional attributes if neither labelconstraints nor componentconstraints are specified.
columnspan   Sets the column span of the component.
nextline   Automatically calls nextLine () after the component is added if this attribute is set to true.
Child Description
component Append the component after the label.

form-title

This tag is used to add a label title.

Attribute Possible values Description
title   The text label of the Title.
Under <panelbuilder> and <formbuilder>
cellconstraints   Sets the CellConstraints used to add the title. If this attribute is not set, then the title is added using addTitle (title) of the PanelBuilder or appendTitle (title) of the DefaultFormBuilder.

form-nextline

Attribute Possible values Description
lines   Default is 1. Calls nextLine (lines).

form-nextcolumn

Attribute Possible values Description
columns   Default is 1. Calls nextColumn (columns).

form-add

This tag is used to add buttons/components to a <buttonbarbuilder> or <buttonstackbuilder>.

Attribute Possible values Description
fixed   calls addFixed () instead of addGridded ().
related   If there are multiple component children, calls addRelatedGap () or addUnrelatedGap () between two components.
Under <buttonbarbuilder> additional attributes
narrow   If fixed is true, calls addFixedNarrow () instead of addFixed ()
growing   If fixed is false, calls addGriddedGrowing () instead of addGridded ()
Child Description
component There can be multiple components, and a (un)related gap is added between two adjacent components.

form-gap

This tag is used to explicitly add a gap in <buttonbarbuilder> or <buttonstackbuilder>.

Attribute Possible values Description
related   Add an (un)related gap.

form-glue

This tag is used to add a glue which consumes extra spaces in <buttonbarbuilder> or <buttonstackbuilder>.


form-strut

This tag is used to add an constant sized space in <buttonbarbuilder> or <buttonstackbuilder>.

Attribute Possible values Description
size   One of the constant values in com.jgoodies.forms.layout.Sizes.

formdebugpanel

Inherited from tag: panel

Class: com.jgoodies.forms.debug.FormDebugPanel

This panel is used for debugging purpose to show the grid.


formborder

Attribute Possible values Description
name   One of the Border constants defined com.jgoodies.forms.factories.Borders.

This tag is used to retrieve some of the useful predefined borders.

(c) Copyright 2004-2007 Heng Yuan. All rights reserved.

Valid XHTML 1.0! Valid CSS!