Class ButtonLayoutTag
- 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.ButtonLayoutTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
public class ButtonLayoutTag extends LayoutTag
A specialized layout tag that creates a
.ButtonLayout
All properties defining a button layout can be specified using attributes of this tag. The following table lists all supported attributes:
Attribute Description Optional topMargin Allows to define the top margin (a number with an optional unit). yes leftMargin Allows to define the left margin (a number with an optional unit). yes rightMargin Allows to define the right margin (a number with an optional unit). yes bottomMargin Allows to define the bottom margin (a number with an optional unit). yes gap Defines the gap between the buttons (a number with an optional unit). yes .align Defines the alignment of the button bar. This is a string with the allowed values Left, right, or center (case does not matter). - Version:
- $Id: ButtonLayoutTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ButtonLayoutTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ButtonLayout
createButtonLayout()
Creates the button layout object.protected Object
createLayout(ComponentManager manager)
Creates the layout object.String
getAlign()
Returns the alignment.String
getBottomMargin()
Returns the bottom margin.ButtonLayout
getButtonLayout()
Returns the newly created button layout object.String
getGap()
Returns the gap.String
getLeftMargin()
Returns the left margin.String
getRightMargin()
Returns the right margin.String
getTopMargin()
Returns the top margin.void
setAlign(String align)
Sets the alignment.void
setBottomMargin(String bottomMargin)
Sets the bottom margin.void
setGap(String gap)
Sets the gap.void
setLeftMargin(String leftMargin)
Sets the left margin.void
setRightMargin(String rightMargin)
Sets the right margin.void
setTopMargin(String topMargin)
Sets the top margin.-
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
-
getAlign
public String getAlign()
Returns the alignment.- Returns:
- the alignment
-
setAlign
public void setAlign(String align)
Sets the alignment.- Parameters:
align
- the alignment as string
-
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
-
getGap
public String getGap()
Returns the gap.- Returns:
- the gap between the buttons
-
setGap
public void setGap(String gap)
Sets the gap.- Parameters:
gap
- the gap between the buttons 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
-
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
-
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
-
getButtonLayout
public ButtonLayout getButtonLayout()
Returns the newly created button layout object.- Returns:
- the button layout
-
createLayout
protected Object createLayout(ComponentManager manager) throws FormBuilderException, org.apache.commons.jelly.MissingAttributeException
Creates the layout object.- Specified by:
createLayout
in classLayoutTag
- Parameters:
manager
- the component manager- Returns:
- the new layout object
- Throws:
FormBuilderException
- if creation fails or invalid attribute values are providedorg.apache.commons.jelly.MissingAttributeException
- if required attributes are missing
-
createButtonLayout
protected ButtonLayout createButtonLayout() throws FormBuilderException
Creates the button layout object. This method is called by thecreateLayout()
method.- Returns:
- the button layout object
- Throws:
FormBuilderException
- if an error occurs
-
-