com.jgoodies.forms.factories

Class FormFactory

public final class FormFactory extends Object

Provides frequently used column and row specifications.

Version: $Revision: 1.11 $

Author: Karsten Lentzsch

See Also: FormLayout ColumnSpec

Field Summary
static ColumnSpecBUTTON_COLSPEC
Describes a logical horizontal column for a fixed size button.
static RowSpecBUTTON_ROWSPEC
Describes a logical row for a fixed size button.
static ColumnSpecDEFAULT_COLSPEC
An unmodifiable ColumnSpec that determines its preferred width by computing the maximum of all column component preferred widths and its minimum width by computing all column component minimum widths.

Useful to let a column shrink from preferred width to minimum width if the container space gets scarce.

static RowSpecDEFAULT_ROWSPEC
An unmodifiable RowSpec that determines its preferred height by computing the maximum of all column component preferred heights and its minimum height by computing all column component minimum heights.

Useful to let a column shrink from preferred height to minimum height if the container space gets scarce.

static ColumnSpecGLUE_COLSPEC
An unmodifiable ColumnSpec that has an initial width of 0 pixels and that grows.
static RowSpecGLUE_ROWSPEC
An unmodifiable RowSpec that has an initial height of 0 pixels and that grows.
static ColumnSpecGROWING_BUTTON_COLSPEC
Describes a logical horizontal column for a growing button.
static ColumnSpecLABEL_COMPONENT_GAP_COLSPEC
Describes a logical horizontal gap between a label and an associated component.
static RowSpecLINE_GAP_ROWSPEC
Describes the logical vertical default gap between two rows in the grid.
static ColumnSpecMIN_COLSPEC
An unmodifiable ColumnSpec that determines its width by computing the maximum of all column component minimum widths.
static RowSpecMIN_ROWSPEC
An unmodifiable RowSpec that determines its height by computing the maximum of all column component minimum heights.
static RowSpecNARROW_LINE_GAP_ROWSPEC
Describes a logical vertical narrow gap between two rows in the grid.
static RowSpecPARAGRAPH_GAP_ROWSPEC
Describes the logical vertical default gap between two paragraphs in the layout grid.
static ColumnSpecPREF_COLSPEC
An unmodifiable ColumnSpec that determines its width by computing the maximum of all column component preferred widths.
static RowSpecPREF_ROWSPEC
An unmodifiable RowSpec that determines its height by computing the maximum of all column component preferred heights.
static ColumnSpecRELATED_GAP_COLSPEC
Describes a logical horizontal gap between two related components.
static RowSpecRELATED_GAP_ROWSPEC
Describes a logical vertical gap between two related components.
static ColumnSpecUNRELATED_GAP_COLSPEC
Describes a logical horizontal gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

static RowSpecUNRELATED_GAP_ROWSPEC
Describes a logical vertical gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

Method Summary
static ColumnSpeccreateGapColumnSpec(ConstantSize gapWidth)
Creates and returns a {@link ColumnSpec} that represents a gap with the specified {@link ConstantSize}.
static RowSpeccreateGapRowSpec(ConstantSize gapHeight)
Creates and returns a {@link RowSpec} that represents a gap with the specified {@link ConstantSize}.

Field Detail

BUTTON_COLSPEC

public static final ColumnSpec BUTTON_COLSPEC
Describes a logical horizontal column for a fixed size button. This spec honors the current layout style's default button minimum width.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: GROWING_BUTTON_COLSPEC

BUTTON_ROWSPEC

public static final RowSpec BUTTON_ROWSPEC
Describes a logical row for a fixed size button. This spec honors the current layout style's default button minimum height.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

Since: 1.2

DEFAULT_COLSPEC

public static final ColumnSpec DEFAULT_COLSPEC
An unmodifiable ColumnSpec that determines its preferred width by computing the maximum of all column component preferred widths and its minimum width by computing all column component minimum widths.

Useful to let a column shrink from preferred width to minimum width if the container space gets scarce.

See Also: MIN_COLSPEC PREF_COLSPEC

DEFAULT_ROWSPEC

public static final RowSpec DEFAULT_ROWSPEC
An unmodifiable RowSpec that determines its preferred height by computing the maximum of all column component preferred heights and its minimum height by computing all column component minimum heights.

Useful to let a column shrink from preferred height to minimum height if the container space gets scarce.

See Also: MIN_COLSPEC PREF_COLSPEC

GLUE_COLSPEC

public static final ColumnSpec GLUE_COLSPEC
An unmodifiable ColumnSpec that has an initial width of 0 pixels and that grows. Useful to describe glue columns that fill the space between other columns.

See Also: GLUE_ROWSPEC

GLUE_ROWSPEC

public static final RowSpec GLUE_ROWSPEC
An unmodifiable RowSpec that has an initial height of 0 pixels and that grows. Useful to describe glue rows that fill the space between other rows.

See Also: GLUE_COLSPEC

GROWING_BUTTON_COLSPEC

public static final ColumnSpec GROWING_BUTTON_COLSPEC
Describes a logical horizontal column for a growing button. This spec does not use the layout style's default button minimum width.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: BUTTON_COLSPEC

LABEL_COMPONENT_GAP_COLSPEC

public static final ColumnSpec LABEL_COMPONENT_GAP_COLSPEC
Describes a logical horizontal gap between a label and an associated component. Useful for builders that automatically fill a grid with labels and components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

Since: 1.0.3

LINE_GAP_ROWSPEC

public static final RowSpec LINE_GAP_ROWSPEC
Describes the logical vertical default gap between two rows in the grid. A little bit larger than the narrow line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: NARROW_LINE_GAP_ROWSPEC PARAGRAPH_GAP_ROWSPEC

MIN_COLSPEC

public static final ColumnSpec MIN_COLSPEC
An unmodifiable ColumnSpec that determines its width by computing the maximum of all column component minimum widths.

See Also: PREF_COLSPEC DEFAULT_COLSPEC

MIN_ROWSPEC

public static final RowSpec MIN_ROWSPEC
An unmodifiable RowSpec that determines its height by computing the maximum of all column component minimum heights.

See Also: PREF_ROWSPEC DEFAULT_ROWSPEC

NARROW_LINE_GAP_ROWSPEC

public static final RowSpec NARROW_LINE_GAP_ROWSPEC
Describes a logical vertical narrow gap between two rows in the grid. Useful if the vertical space is scarce or if an individual vertical gap shall be small than the default line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: LINE_GAP_ROWSPEC PARAGRAPH_GAP_ROWSPEC

PARAGRAPH_GAP_ROWSPEC

public static final RowSpec PARAGRAPH_GAP_ROWSPEC
Describes the logical vertical default gap between two paragraphs in the layout grid. This gap is larger than the default line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: NARROW_LINE_GAP_ROWSPEC LINE_GAP_ROWSPEC

PREF_COLSPEC

public static final ColumnSpec PREF_COLSPEC
An unmodifiable ColumnSpec that determines its width by computing the maximum of all column component preferred widths.

See Also: MIN_COLSPEC DEFAULT_COLSPEC

PREF_ROWSPEC

public static final RowSpec PREF_ROWSPEC
An unmodifiable RowSpec that determines its height by computing the maximum of all column component preferred heights.

See Also: MIN_ROWSPEC DEFAULT_ROWSPEC

RELATED_GAP_COLSPEC

public static final ColumnSpec RELATED_GAP_COLSPEC
Describes a logical horizontal gap between two related components. For example the OK and Cancel buttons are considered related.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: UNRELATED_GAP_COLSPEC

RELATED_GAP_ROWSPEC

public static final RowSpec RELATED_GAP_ROWSPEC
Describes a logical vertical gap between two related components. For example the OK and Cancel buttons are considered related.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: UNRELATED_GAP_ROWSPEC

UNRELATED_GAP_COLSPEC

public static final ColumnSpec UNRELATED_GAP_COLSPEC
Describes a logical horizontal gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: RELATED_GAP_COLSPEC

UNRELATED_GAP_ROWSPEC

public static final RowSpec UNRELATED_GAP_ROWSPEC
Describes a logical vertical gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

See Also: RELATED_GAP_ROWSPEC

Method Detail

createGapColumnSpec

public static ColumnSpec createGapColumnSpec(ConstantSize gapWidth)

Deprecated: Replaced by {@link ColumnSpec#createGap(ConstantSize)}. This method will be removed from the Forms 2.0 API.

Creates and returns a {@link ColumnSpec} that represents a gap with the specified {@link ConstantSize}.

Parameters: gapWidth a ConstantSize that specifies the gap

Returns: a ColumnSpec that describes a horizontal gap

createGapRowSpec

public static RowSpec createGapRowSpec(ConstantSize gapHeight)

Deprecated: Replaced by {@link RowSpec#createGap(ConstantSize)}. This method will be removed from the Forms 2.0 API.

Creates and returns a {@link RowSpec} that represents a gap with the specified {@link ConstantSize}.

Parameters: gapHeight a ConstantSize that specifies the gap

Returns: a RowSpec that describes a vertical gap

Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.