当前位置: 首页>>代码示例>>Java>>正文


Java JRPrintHyperlink.getHyperlinkTooltip方法代码示例

本文整理汇总了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;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:27,代码来源:ViewerCanvas.java

示例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;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:11,代码来源:JRViewer300.java

示例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("\"");
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:47,代码来源:HtmlExporter.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:68,代码来源:HtmlExporter.java

示例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;
	}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:48,代码来源:JRDocxExporter.java


注:本文中的net.sf.jasperreports.engine.JRPrintHyperlink.getHyperlinkTooltip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。