Class ConstraintsTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ConstraintsTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
- Direct Known Subclasses:
BorderConstraintsTag
,PercentConstraintsTag
public abstract class ConstraintsTag extends FormBaseTag
An abstract base class for creating layout constraints objects.
The task of this tag and its concrete sub classes is to create and initialize a layout constraints object of a specific type and to pass this object to the component tag this tag is nested into. From there it will be used when the corresponding component is added into a container.
This base class already implements functionality for searching the associated component tag and for calling the setter method for the constraints object. Concrete sub classes only have to implement the logic for creating the constraints object.
- Version:
- $Id: ConstraintsTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ConstraintsTag()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Object
createConstraints(ComponentManager manager)
Creates the constraints object.protected void
process()
Executes this tag.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
canProcess, canProcess, convertToClass, convertToNumberWithUnit, convertToNumberWithUnit, doTag, findContainer, getBuilderData, getBuilderData, getIfName, getResourceText, getResourceText, getUnlessName, processBeforeBody, setIfName, setUnlessName
-
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
-
-
-
Method Detail
-
process
protected void process() throws org.apache.commons.jelly.JellyTagException, FormBuilderException
Executes this tag. Searches for the corresponding component tag. CallscreateConstraints()
to create the constraints. Then the new constraints object is passed to the component tag.- Specified by:
process
in classFormBaseTag
- Throws:
org.apache.commons.jelly.JellyTagException
- if there is a jelly specific errorFormBuilderException
- if an error occurs
-
createConstraints
protected abstract Object createConstraints(ComponentManager manager) throws FormBuilderException, org.apache.commons.jelly.MissingAttributeException
Creates the constraints object. This method must be implemented in concrete sub classes to create an object of the specific layout constraints class.- Parameters:
manager
- the component manager- Returns:
- the layout constraints object
- Throws:
FormBuilderException
- if an error occursorg.apache.commons.jelly.MissingAttributeException
- if required attributes are missing
-
-