com.jgoodies.forms.factories
Class Forms

java.lang.Object
  extended by com.jgoodies.forms.factories.Forms

public class Forms
extends Object

Provides convenience behavior for building forms.

Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch

Method Summary
static JComponent border(Border border, JComponent component)
           
static JComponent border(String emptyBorderSpec, JComponent component)
           
protected static JComponent buildGroupedButtonBar(AbstractButton... buttons)
          Builds and returns a button bar that consists of the given buttons.
static JComponent buttonBar(JComponent... buttons)
           
static JComponent centered(JComponent component)
           
static JComponent checkBoxBar(JCheckBox... checkBoxes)
          Builds and returns a panel where the given check boxes are laid out in a row.
static JComponent horizontal(String gapColSpec, JComponent... components)
           
static JComponent radioButtonBar(JRadioButton... radioButtons)
          Builds and returns a panel where the given radio buttons are laid out in a row.
static JComponent single(String columnSpec, String rowSpec, JComponent component)
           
static JComponent vertical(String gapRowSpec, JComponent... components)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

single

public static JComponent single(String columnSpec,
                                String rowSpec,
                                JComponent component)

centered

public static JComponent centered(JComponent component)

border

public static JComponent border(Border border,
                                JComponent component)

border

public static JComponent border(String emptyBorderSpec,
                                JComponent component)

horizontal

public static JComponent horizontal(String gapColSpec,
                                    JComponent... components)

vertical

public static JComponent vertical(String gapRowSpec,
                                  JComponent... components)

buttonBar

public static JComponent buttonBar(JComponent... buttons)

checkBoxBar

public static JComponent checkBoxBar(JCheckBox... checkBoxes)
Builds and returns a panel where the given check boxes are laid out in a row.

If class com.jgoodies.jsdl.common.focus.FocusTraversalUtils from the JSDL Common library is in the class path, it is used to group the radio buttons. Focus is transferred to/from the selected button in a group; and cursor-left/-right change the selection in the group.

Returns:
the built panel

radioButtonBar

public static JComponent radioButtonBar(JRadioButton... radioButtons)
Builds and returns a panel where the given radio buttons are laid out in a row.

If class com.jgoodies.jsdl.common.focus.FocusTraversalUtils from the JSDL Common library is in the class path, it is used to group the radio buttons. Focus is transferred to/from the selected button in a group; and cursor-left/-right change the selection in the group.

Returns:
the built panel

buildGroupedButtonBar

protected static JComponent buildGroupedButtonBar(AbstractButton... buttons)
Builds and returns a button bar that consists of the given buttons. Aims to build a focus group via the FocusTraversalUtils, if in the classpath.

Returns:
the built panel


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