Class BorderLayoutTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.LayoutTag
-
- net.sf.jguiraffe.gui.builder.components.tags.BorderLayoutTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
public class BorderLayoutTag extends LayoutTag
A special layout tag that creates a
BorderLayout
object.All properties provided by the extended
BorderLayout
class can be set using attributes of this tag. The following table lists all supported attributes:Attribute Description Optional leftMargin Allows to define the left margin. This is a number with an optional unit. yes topMargin Allows to define the top margin. This is a number with an optional unit. yes rightMargin Allows to define the right margin. This is a number with an optional unit. yes bottomMargin Allows to define the bottom margin. This is a number with an optional unit. yes northGap Allows to define the north gap, i.e. the space between the north and the center cell. yes westGap Allows to define the west gap, i.e. the space between the west and the center cell. yes southGap Allows to define the south gap, i.e. the space between the south and the center cell. yes eastGap Allows to define the east gap, i.e. the space between the east and the center cell. yes canShrink Sets the canShrink
flag of the layout, i.e. the flag whether the layout can shrink below its preferred size. Default value is false.yes - Version:
- $Id: BorderLayoutTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description BorderLayoutTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BorderLayout
createBorderLayout()
Creates the border layout object based on this tag's attributes.protected Object
createLayout(ComponentManager manager)
Creates the border layout object.BorderLayout
getBorderLayout()
Returns the newly created border layout object.String
getBottomMargin()
Returns the bottom margin.String
getEastGap()
Returns the east gap.String
getLeftMargin()
Returns the left margin.String
getNorthGap()
Returns the north gap.String
getRightMargin()
Returns the right margin.String
getSouthGap()
Returns the south gap.String
getTopMargin()
Returns the top margin.String
getWestGap()
Returns the west gap.boolean
isCanShrink()
Returns thecanShrink
flag of the layout.void
setBottomMargin(String bottomMargin)
Sets the bottom margin.void
setCanShrink(boolean canShrink)
Set method of thecanShrink
attribute.void
setEastGap(String eastGap)
Sets the east gap.void
setLeftMargin(String leftMargin)
Sets the left margin.void
setNorthGap(String northGap)
Sets the north gap.void
setRightMargin(String rightMargin)
Sets the right margin.void
setSouthGap(String southGap)
Sets the south gap.void
setTopMargin(String topMargin)
Sets the top margin.void
setWestGap(String westGap)
Sets the west gap.-
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
-
getBottomMargin
public String getBottomMargin()
Returns the bottom margin.- Returns:
- the bottom margin
-
setBottomMargin
public void setBottomMargin(String bottomMargin)
Sets the bottom margin.- Parameters:
bottomMargin
- the bottom margin as string
-
getEastGap
public String getEastGap()
Returns the east gap.- Returns:
- the east gap
-
setEastGap
public void setEastGap(String eastGap)
Sets the east gap.- Parameters:
eastGap
- the east gap as string
-
getLeftMargin
public String getLeftMargin()
Returns the left margin.- Returns:
- the left margin
-
setLeftMargin
public void setLeftMargin(String leftMargin)
Sets the left margin.- Parameters:
leftMargin
- the left margin as string
-
getNorthGap
public String getNorthGap()
Returns the north gap.- Returns:
- the north gap
-
setNorthGap
public void setNorthGap(String northGap)
Sets the north gap.- Parameters:
northGap
- the north gap as string
-
getRightMargin
public String getRightMargin()
Returns the right margin.- Returns:
- the right margin
-
setRightMargin
public void setRightMargin(String rightMargin)
Sets the right margin.- Parameters:
rightMargin
- the right margin as string
-
getSouthGap
public String getSouthGap()
Returns the south gap.- Returns:
- the south gap
-
setSouthGap
public void setSouthGap(String southGap)
Sets the south gap.- Parameters:
southGap
- the south gap as string
-
getTopMargin
public String getTopMargin()
Returns the top margin.- Returns:
- the top margin
-
setTopMargin
public void setTopMargin(String topMargin)
Sets the top margin.- Parameters:
topMargin
- the top margin as string
-
getWestGap
public String getWestGap()
Returns the west gap.- Returns:
- the west gap
-
setWestGap
public void setWestGap(String westGap)
Sets the west gap.- Parameters:
westGap
- the west gap as string
-
isCanShrink
public boolean isCanShrink()
Returns thecanShrink
flag of the layout.- Returns:
- the shrink flag
-
setCanShrink
public void setCanShrink(boolean canShrink)
Set method of thecanShrink
attribute.- Parameters:
canShrink
- the attribute's value
-
getBorderLayout
public BorderLayout getBorderLayout()
Returns the newly created border layout object.- Returns:
- the layout object
-
createLayout
protected Object createLayout(ComponentManager manager) throws FormBuilderException, org.apache.commons.jelly.MissingAttributeException
Creates the border layout object.- Specified by:
createLayout
in classLayoutTag
- Parameters:
manager
- the component manager- Returns:
- the new layout object
- Throws:
FormBuilderException
- if the layout cannot be created or attributes contain invalid valuesorg.apache.commons.jelly.MissingAttributeException
- if required attributes are missing
-
createBorderLayout
protected BorderLayout createBorderLayout() throws FormBuilderException
Creates the border layout object based on this tag's attributes.- Returns:
- the new border layout object
- Throws:
FormBuilderException
- if an error occurs caused by invalid attributes
-
-