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

      • BorderLayoutTag

        public BorderLayoutTag()
    • 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 the canShrink flag of the layout.
        Returns:
        the shrink flag
      • setCanShrink

        public void setCanShrink​(boolean canShrink)
        Set method of the canShrink 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 class LayoutTag
        Parameters:
        manager - the component manager
        Returns:
        the new layout object
        Throws:
        FormBuilderException - if the layout cannot be created or attributes contain invalid values
        org.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