Class TooltipsGenerator

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.wso2.carbon.ui.taglibs.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:
  • Field Summary

    Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    bodyContent

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

    EVAL_BODY_BUFFERED, EVAL_BODY_TAG

    Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface javax.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createTooltipsBody(int noOfWordsPerLine)
    This method is used to design the tooltips content display window size.
    int
    This method is invoked when the custom end tag is encountered.
    This method is used to get the resource bundle define in a jsp page.
     
     
     
    int
     
     
    This method is used to get the tooltips content from resource file.
    void
    setDescription(String description)
     
    void
     
    void
     
    void
    setNoOfWordsPerLine(int noOfWordsPerLine)
     
    void
    setResourceBundle(String resourceBundle)
     

    Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.servlet.jsp.tagext.Tag

    getParent, setPageContext, setParent
  • Constructor Details

    • TooltipsGenerator

      public TooltipsGenerator()
  • Method Details

    • 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