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.BodyTagSupportThis Tag Handler class is used to add a tooltips for a image.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TooltipsGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateTooltipsBody(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.ResourceBundlegetCommonResourceBundleForJspPage()This method is used to get the resource bundle define in a jsp page.StringgetDescription()StringgetImage()StringgetKey()intgetNoOfWordsPerLine()StringgetResourceBundle()StringgetTooltipsContentFromKey()This method is used to get the tooltips content from resource file.voidsetDescription(String description)voidsetImage(String image)voidsetKey(String key)voidsetNoOfWordsPerLine(int noOfWordsPerLine)voidsetResourceBundle(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
-
-
-
-
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.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
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
-
-