chrriis.uihierarchy.constraints
Class SpringHConstraints
java.lang.Object
chrriis.uihierarchy.constraints.SpringHConstraints
- All Implemented Interfaces:
- LayoutHConstraints
- public class SpringHConstraints
- extends Object
- implements LayoutHConstraints
The constraints for a Spring layout. Constraints are manipulated by the
createConstraints
method, if they are a String.
The format is of the form "key1=expression1, key2=expression2, ...".
The possible keys are a direction or a location: "west", "north", "east",
"south", "x", "y", "width" and "height".
The expressions are combinations of constants and component based
constraints. An example can be: "5+comp.east", where "comp" is a component
that was mapped to this name. Additionaly, there is support for
max(a, b, ...) with parameters that are themselves expressions.
With the Spring layout, the container itself needs to get some constraints.
It is possible to create the constraints for the container using the
subConstrain
method.
- Version:
- 1.1 2003.11.03
- Author:
- Christopher Deckers (chrriis@brainlex.com)
SpringHConstraints
public SpringHConstraints()
createConstraints
public Object createConstraints(SingleLevelAccessor accessor,
Container parentContainer,
Object constraints)
- Create the constraints for a Spring 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:
- null, or the original constraints if not a String.
- See Also:
HNode.subConstrain(java.lang.Object)
,
HRootNode.subConstrain(java.lang.Object)
,
HLeaf.map(java.lang.String)
,
HNode.map(java.lang.String)
,
HRootNode.map(java.lang.String)