chrriis.uihierarchy.constraints
Class FormHConstraints

java.lang.Object
  extended bychrriis.uihierarchy.constraints.FormHConstraints
All Implemented Interfaces:
LayoutHConstraints

public class FormHConstraints
extends Object
implements LayoutHConstraints

The constraints for a Form layout (www.jgoodies.com). Constraints are manipulated by the createConstraints method, if they are a String.

The format is directly what is expected by the form layout.

The only difference is that the constraints for the parent (the rows and the columns groups) can be defined using a String representation of the form: "rowgroups=[[1, 2], [3, 4]], columngroups=[[1, 2], [3, 4]]".
Several arrays can be used (not only two as in the example), and several comma-separated numbers. Also, it is possible to constrain only rowgroups or columngroups.

Version:
1.0 2003.10.23
Author:
Christopher Deckers (chrriis@brainlex.com)

Constructor Summary
FormHConstraints()
           
 
Method Summary
 Object createConstraints(SingleLevelAccessor accessor, Container parentContainer, Object constraints)
          Create the constraints for a Form layout, if the parameter is a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormHConstraints

public FormHConstraints()
Method Detail

createConstraints

public Object createConstraints(SingleLevelAccessor accessor,
                                Container parentContainer,
                                Object constraints)
Create the constraints for a Form layout, if the parameter is a String.

Specified by:
createConstraints in interface LayoutHConstraints
Parameters:
accessor - The accessor of the level for which to create the constraints.
parentContainer - The parent container.
constraints - The constraints of the component.
Returns:
The cell constraints, the original constraints if not a String, or null if the parent container is the component.