Class TextIconTag

  • All Implemented Interfaces:
    ConditionalTag, IconSupport, org.apache.commons.jelly.Tag
    Direct Known Subclasses:
    LabelTag

    public abstract class TextIconTag
    extends SimpleComponentTag
    implements IconSupport

    A base class for simple components that support a display text and an icon.

    This abstract base class provides common functionality for maintaining the data needed by components that support text and an icon. A basic set of attributes is supported. Derived classes only have to define their specific attributes and deal with the creation of the corresponding component.

    Version:
    $Id: TextIconTag.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • TextIconTag

        protected TextIconTag()
        Creates a new instance of TextIconTag.
    • Method Detail

      • getTextIconData

        public TextIconData getTextIconData()
        Returns the text icon data object associated with this tag.
        Returns:
        the text icon data object
      • setIcon

        public void setIcon​(Object icon)
        Setter method for the icon attribute.
        Specified by:
        setIcon in interface IconSupport
        Parameters:
        icon - the icon
      • setText

        public void setText​(String text)
        Setter method for the text attribute.
        Parameters:
        text - the text to set
      • setResgrp

        public void setResgrp​(String resgrp)
        Setter method for the resgrp attribute. Defines the group for resolving the resource for the component's text.
        Parameters:
        resgrp - the resource group
      • setTextres

        public void setTextres​(String textres)
        Setter method for the textres attribute. Specifies the resource ID for resolving the component's text
        Parameters:
        textres - the text resource ID
      • setAlignment

        public void setAlignment​(String al)
        Setter method of the alignment attribute.
        Parameters:
        al - the attribute value
      • setMnemonic

        public void setMnemonic​(String m)
        Setter method of the mnemonic attribute.
        Parameters:
        m - the attribute value
      • setMnemonicres

        public void setMnemonicres​(String resID)
        Setter method of the mnemonicres attribute.
        Parameters:
        resID - the attribute value
      • checkAttributes

        protected void checkAttributes()
                                throws org.apache.commons.jelly.MissingAttributeException
        Checks if all mandatory attributes are defined.
        Throws:
        org.apache.commons.jelly.MissingAttributeException - if attributes are missing