Class TooltipsGenerator

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class TooltipsGenerator
    extends javax.servlet.jsp.tagext.BodyTagSupport
    This Tag Handler class is used to add a tooltips for a image.
    See Also:
    Serialized Form
    • Constructor Detail

      • TooltipsGenerator

        public TooltipsGenerator()
    • Method Detail

      • getImage

        public String getImage()
      • setImage

        public void setImage​(String image)
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String description)
      • getNoOfWordsPerLine

        public int getNoOfWordsPerLine()
      • setNoOfWordsPerLine

        public void setNoOfWordsPerLine​(int noOfWordsPerLine)
      • getResourceBundle

        public String getResourceBundle()
      • setResourceBundle

        public void setResourceBundle​(String resourceBundle)
      • getKey

        public String getKey()
      • setKey

        public void setKey​(String key)
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        This method is invoked when the custom end tag is encountered. The main function of this method is to add a image and display a tooltips when mouse over that image. This is done by calling the 'showTooltips' method in ../admin/js/widgets.js java script file.
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Returns:
        return EVAL_PAGE - continue processing the page.
        Throws:
        javax.servlet.jsp.JspException
      • createTooltipsBody

        public String createTooltipsBody​(int noOfWordsPerLine)
        This method is used to design the tooltips content display window size. This takes the no of words that should contains in a single line as a argument. So when we create tooltips body, its size vary accordingly.
        Parameters:
        noOfWordsPerLine - no of words that should contain in single line of tooltips body.
        Returns:
        return the tooltips body content in displayable way in tooltips.
      • getTooltipsContentFromKey

        public String getTooltipsContentFromKey()
                                         throws javax.servlet.jsp.JspException
        This method is used to get the tooltips content from resource file.
        Returns:
        return the tooltips body content in displayable way in tooltips.
        Throws:
        javax.servlet.jsp.JspException
      • getCommonResourceBundleForJspPage

        public ResourceBundle getCommonResourceBundleForJspPage()
        This method is used to get the resource bundle define in a jsp page.
        Returns:
        return the resource bundle