本文整理汇总了Java中net.sf.jasperreports.engine.JRPrintHyperlink.getHyperlinkTooltip方法的典型用法代码示例。如果您正苦于以下问题:Java JRPrintHyperlink.getHyperlinkTooltip方法的具体用法?Java JRPrintHyperlink.getHyperlinkTooltip怎么用?Java JRPrintHyperlink.getHyperlinkTooltip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.JRPrintHyperlink
的用法示例。
在下文中一共展示了JRPrintHyperlink.getHyperlinkTooltip方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLinkToolTip
import net.sf.jasperreports.engine.JRPrintHyperlink; //导入方法依赖的package包/类
private String getLinkToolTip(JRPrintHyperlink link) {
String tTip = link.getHyperlinkTooltip();
if (tTip == null) {
HyperlinkTypeEnum hType = link.getHyperlinkTypeValue();
if (hType.equals(HyperlinkTypeEnum.REFERENCE))
tTip = link.getHyperlinkReference();
else if (hType.equals(HyperlinkTypeEnum.LOCAL_ANCHOR)) {
if (link.getHyperlinkAnchor() != null)
tTip = "#" + link.getHyperlinkAnchor(); //$NON-NLS-1$
} else if (hType.equals(HyperlinkTypeEnum.LOCAL_PAGE)) {
if (link.getHyperlinkPage() != null)
tTip = "#page " + link.getHyperlinkPage(); //$NON-NLS-1$
} else if (hType.equals(HyperlinkTypeEnum.REMOTE_ANCHOR)) {
if (link.getHyperlinkReference() != null)
tTip = link.getHyperlinkReference();
if (currentLink.getHyperlinkAnchor() != null)
tTip = "#" + currentLink.getHyperlinkAnchor(); //$NON-NLS-1$
} else if (hType.equals(HyperlinkTypeEnum.REMOTE_PAGE)) {
if (link.getHyperlinkReference() != null)
tTip = link.getHyperlinkReference();
if (link.getHyperlinkPage() != null)
tTip = "#page " + link.getHyperlinkPage(); //$NON-NLS-1$
}
}
return tTip;
}
示例2: getHyperlinkTooltip
import net.sf.jasperreports.engine.JRPrintHyperlink; //导入方法依赖的package包/类
protected String getHyperlinkTooltip(JRPrintHyperlink hyperlink)
{
String toolTip;
toolTip = hyperlink.getHyperlinkTooltip();
if (toolTip == null)
{
toolTip = getFallbackTooltip(hyperlink);
}
return toolTip;
}
示例3: writeImageAreaHyperlink
import net.sf.jasperreports.engine.JRPrintHyperlink; //导入方法依赖的package包/类
protected void writeImageAreaHyperlink(JRPrintHyperlink hyperlink) throws IOException
{
if (getReportContext() != null)
{
if (hyperlink.getLinkType() != null)
{
int id = hyperlink.hashCode() & 0x7FFFFFFF;
writer.write(" class=\"_jrHyperLink " + hyperlink.getLinkType() + "\" data-id=\"" + id + "\"");
HyperlinkData hyperlinkData = new HyperlinkData();
hyperlinkData.setId(String.valueOf(id));
hyperlinkData.setHref(getHyperlinkURL(hyperlink));
hyperlinkData.setSelector("._jrHyperLink." + hyperlink.getLinkType());
hyperlinkData.setHyperlink(hyperlink);
hyperlinksData.add(hyperlinkData);
}
}
else
{
String href = getHyperlinkURL(hyperlink);
if (href == null)
{
writer.write(" nohref=\"nohref\"");
}
else
{
writer.write(" href=\"" + href + "\"");
String target = getHyperlinkTarget(hyperlink);
if (target != null)
{
writer.write(" target=\"");
writer.write(target);
writer.write("\"");
}
}
}
if (hyperlink.getHyperlinkTooltip() != null)
{
writer.write(" title=\"");
writer.write(JRStringUtil.xmlEncode(hyperlink.getHyperlinkTooltip()));
writer.write("\"");
}
}
示例4: startHyperlink
import net.sf.jasperreports.engine.JRPrintHyperlink; //导入方法依赖的package包/类
protected boolean startHyperlink(JRPrintHyperlink link) throws IOException
{
boolean hyperlinkStarted = false,
canWrite = false;
if (getReportContext() != null)
{
Boolean ignoreHyperlink = HyperlinkUtil.getIgnoreHyperlink(HtmlReportConfiguration.PROPERTY_IGNORE_HYPERLINK, link);
if (ignoreHyperlink == null)
{
ignoreHyperlink = getCurrentItemConfiguration().isIgnoreHyperlink();
}
if (!ignoreHyperlink && link.getLinkType() != null)
{
canWrite = true;
int id = link.hashCode() & 0x7FFFFFFF;
writer.write("<span class=\"_jrHyperLink " + link.getLinkType() + "\" data-id=\"" + id + "\"");
HyperlinkData hyperlinkData = new HyperlinkData();
hyperlinkData.setId(String.valueOf(id));
hyperlinkData.setHref(getHyperlinkURL(link));
hyperlinkData.setSelector("._jrHyperLink." + link.getLinkType());
hyperlinkData.setHyperlink(link);
hyperlinksData.add(hyperlinkData);
hyperlinkStarted = true;
}
}
else
{
String href = getHyperlinkURL(link);
if (href != null)
{
canWrite = true;
writer.write("<a href=\"");
writer.write(href);
writer.write("\"");
String target = getHyperlinkTarget(link);
if (target != null)
{
writer.write(" target=\"");
writer.write(target);
writer.write("\"");
}
}
hyperlinkStarted = href != null;
}
if (canWrite)
{
if (link.getHyperlinkTooltip() != null)
{
writer.write(" title=\"");
writer.write(JRStringUtil.xmlEncode(link.getHyperlinkTooltip()));
writer.write("\"");
}
writer.write(">");
}
return hyperlinkStarted;
}
示例5: startHyperlink
import net.sf.jasperreports.engine.JRPrintHyperlink; //导入方法依赖的package包/类
protected boolean startHyperlink(JRPrintHyperlink link, boolean isText)
{
String href = getHyperlinkURL(link);
if (href != null)
{
// String id = (String)hyperlinksMap.get(href);
// if (id == null)
// {
// id = "link" + hyperlinksMap.size();
// hyperlinksMap.put(href, id);
// }
//
// docHelper.write("<w:hyperlink r:id=\"" + id + "\"");
//
// String target = getHyperlinkTarget(link);//FIXMETARGET
// if (target != null)
// {
// docHelper.write(" tgtFrame=\"" + target + "\"");
// }
//
// docHelper.write(">\n");
docHelper.write("<w:r><w:fldChar w:fldCharType=\"begin\"/></w:r>\n");
String localType = (HyperlinkTypeEnum.LOCAL_ANCHOR == link.getHyperlinkTypeValue() ||
HyperlinkTypeEnum.LOCAL_PAGE == link.getHyperlinkTypeValue()) ? "\\l " : "";
docHelper.write("<w:r><w:instrText xml:space=\"preserve\"> HYPERLINK " + localType +"\"" + JRStringUtil.xmlEncode(href,invalidCharReplacement) + "\"");
String target = getHyperlinkTarget(link);//FIXMETARGET
if (target != null)
{
docHelper.write(" \\t \"" + target + "\"");
}
String tooltip = link.getHyperlinkTooltip();
if (tooltip != null)
{
docHelper.write(" \\o \"" + JRStringUtil.xmlEncode(tooltip, invalidCharReplacement) + "\"");
}
docHelper.write(" </w:instrText></w:r>\n");
docHelper.write("<w:r><w:fldChar w:fldCharType=\"separate\"/></w:r>\n");
}
return href != null;
}