Class PercentConstraintsTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ConstraintsTag
-
- net.sf.jguiraffe.gui.builder.components.tags.PercentConstraintsTag
-
- All Implemented Interfaces:
ConditionalTag,org.apache.commons.jelly.Tag
public class PercentConstraintsTag extends ConstraintsTag
A specific layout constraints tag that creates a
object, i.e. layout constraints for thePercentDataPercentLayoutclass.The following attributes are supported by this tag:
Attribute Description Optional col Defines the number of the column in the layout grid. no row Defines the number of the row in the layout grid. no spanx Defines the number of columns occupied by the component. Defaults to 1. yes spany Defines the number of rows occupied by the component. Defaults to 1. yes colconstr Allows to define column constraints. If this feature is used, a string must be specified that can be parsed by the cell constraints class. yes rowconstr Allows to define row constraints. If this feature is used, a string must be specified that can be parsed by the cell constraints class. yes targetCol Defines the target column. This is important only if the component spans multiple columns. yes targetRow Defines the target row. This is important only if the component spans multiple rows. yes - Version:
- $Id: PercentConstraintsTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description PercentConstraintsTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectcreateConstraints(ComponentManager manager)Creates the constraints object.intgetCol()Returns the column number in the layout grid.StringgetColconstr()Returns the column constraints as string.intgetRow()Returns the row number in the layout grid.StringgetRowconstr()Returns the row constraints as string.intgetSpanx()Returns the number of occupied columns.intgetSpany()Returns the number of occupied rows.intgetTargetCol()Returns the target column.intgetTargetRow()Returns the target row.voidsetCol(int col)Setter method for the col attribute.voidsetColconstr(String colconstr)Setter method for the colconstr attribute.voidsetRow(int row)Setter method for the row attribute.voidsetRowconstr(String rowconstr)Setter method for the rowconstr attribute.voidsetSpanx(int spanx)Setter method for the spanx attribute.voidsetSpany(int spany)Setter method for the spany attribute.voidsetTargetCol(int targetCol)Sets the target column.voidsetTargetRow(int targetRow)Sets the target row.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.ConstraintsTag
process
-
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
-
getCol
public int getCol()
Returns the column number in the layout grid.- Returns:
- the column number
-
setCol
public void setCol(int col)
Setter method for the col attribute.- Parameters:
col- the attribute value
-
getColconstr
public String getColconstr()
Returns the column constraints as string.- Returns:
- the column constraints
-
setColconstr
public void setColconstr(String colconstr)
Setter method for the colconstr attribute.- Parameters:
colconstr- the attribute value
-
getRow
public int getRow()
Returns the row number in the layout grid.- Returns:
- the row number
-
setRow
public void setRow(int row)
Setter method for the row attribute.- Parameters:
row- the attribute value
-
getRowconstr
public String getRowconstr()
Returns the row constraints as string.- Returns:
- the row constraints
-
setRowconstr
public void setRowconstr(String rowconstr)
Setter method for the rowconstr attribute.- Parameters:
rowconstr- the attribute value
-
getSpanx
public int getSpanx()
Returns the number of occupied columns.- Returns:
- the column span
-
setSpanx
public void setSpanx(int spanx)
Setter method for the spanx attribute.- Parameters:
spanx- the attribute value
-
getSpany
public int getSpany()
Returns the number of occupied rows.- Returns:
- the row span
-
setSpany
public void setSpany(int spany)
Setter method for the spany attribute.- Parameters:
spany- the attribute value
-
getTargetCol
public int getTargetCol()
Returns the target column.- Returns:
- the target column
-
setTargetCol
public void setTargetCol(int targetCol)
Sets the target column.- Parameters:
targetCol- the target column
-
getTargetRow
public int getTargetRow()
Returns the target row.- Returns:
- the target row
-
setTargetRow
public void setTargetRow(int targetRow)
Sets the target row.- Parameters:
targetRow- the target row
-
createConstraints
protected Object createConstraints(ComponentManager manager) throws FormBuilderException, org.apache.commons.jelly.MissingAttributeException
Creates the constraints object. This implementation creates an instance of theclass.PercentData- Specified by:
createConstraintsin classConstraintsTag- Parameters:
manager- the component manager (not used)- Returns:
- the new constraints
- Throws:
FormBuilderException- if an error occursorg.apache.commons.jelly.MissingAttributeException- if a required attribute is missing
-
-