chrriis.uihierarchy.constraints
Class FormHConstraints
java.lang.Object
chrriis.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)
FormHConstraints
public FormHConstraints()
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.