Class 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 Detail

      • ButtonLayoutTag

        public ButtonLayoutTag()
    • 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 class LayoutTag
        Parameters:
        manager - the component manager
        Returns:
        the new layout object
        Throws:
        FormBuilderException - if creation fails or invalid attribute values are provided
        org.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 the createLayout() method.
        Returns:
        the button layout object
        Throws:
        FormBuilderException - if an error occurs