Package org.wso2.carbon.ui.taglibs
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
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTooltipsBody(int noOfWordsPerLine) This method is used to design the tooltips content display window size.intdoEndTag()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.getImage()getKey()intThis method is used to get the tooltips content from resource file.voidsetDescription(String description) voidvoidvoidsetNoOfWordsPerLine(int noOfWordsPerLine) voidsetResourceBundle(String resourceBundle) Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Constructor Details
-
TooltipsGenerator
public TooltipsGenerator()
-
-
Method Details
-
getImage
-
setImage
-
getDescription
-
setDescription
-
getNoOfWordsPerLine
public int getNoOfWordsPerLine() -
setNoOfWordsPerLine
public void setNoOfWordsPerLine(int noOfWordsPerLine) -
getResourceBundle
-
setResourceBundle
-
getKey
-
setKey
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspExceptionThis 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:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Returns:
- return EVAL_PAGE - continue processing the page.
- Throws:
javax.servlet.jsp.JspException
-
createTooltipsBody
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
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
This method is used to get the resource bundle define in a jsp page.- Returns:
- return the resource bundle
-