• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JRPrintHyperlink类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.sf.jasperreports.engine.JRPrintHyperlink的典型用法代码示例。如果您正苦于以下问题:Java JRPrintHyperlink类的具体用法?Java JRPrintHyperlink怎么用?Java JRPrintHyperlink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JRPrintHyperlink类属于net.sf.jasperreports.engine包,在下文中一共展示了JRPrintHyperlink类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof XYItemEntity)
	{
		XYItemEntity itemEntity = (XYItemEntity) entity;
		XYDataset dataset = itemEntity.getDataset();
		Comparable<?> serie = dataset.getSeriesKey(itemEntity.getSeriesIndex());
		Map<Pair, JRPrintHyperlink> serieHyperlinks = itemHyperlinks.get(serie);
		if (serieHyperlinks != null)
		{
			Number x = dataset.getX(itemEntity.getSeriesIndex(), itemEntity.getItem());
			Number y = dataset.getY(itemEntity.getSeriesIndex(), itemEntity.getItem());
			Pair<Number,Number> xyKey = new Pair<Number,Number>(x, y);
			printHyperlink = serieHyperlinks.get(xyKey);
		}
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:XYChartHyperlinkProvider.java


示例2: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof XYItemEntity)
	{
		XYItemEntity itemEntity = (XYItemEntity) entity;
		TimeSeriesCollection dataset = (TimeSeriesCollection) itemEntity.getDataset();
		TimeSeries series = dataset.getSeries(itemEntity.getSeriesIndex());
		Map<RegularTimePeriod, JRPrintHyperlink> serieHyperlinks = itemHyperlinks.get(series.getKey());
		if (serieHyperlinks != null)
		{
			RegularTimePeriod timePeriod = series.getTimePeriod(itemEntity.getItem());
			printHyperlink = serieHyperlinks.get(timePeriod);
		}
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:TimeSeriesChartHyperlinkProvider.java


示例3: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof XYItemEntity)
	{
		XYItemEntity itemEntity = (XYItemEntity) entity;
		TimePeriodValuesCollection dataset = (TimePeriodValuesCollection) itemEntity.getDataset();
		TimePeriodValues series = dataset.getSeries(itemEntity.getSeriesIndex());
		Map<TimePeriod, JRPrintHyperlink> serieHyperlinks = itemHyperlinks.get(series.getKey());
		if (serieHyperlinks != null)
		{
			TimePeriod timePeriod = series.getTimePeriod(itemEntity.getItem());
			printHyperlink = serieHyperlinks.get(timePeriod);
		}
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:TimePeriodChartHyperlinkProvider.java


示例4: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof CategoryItemEntity)
	{
		CategoryItemEntity itemEntity = (CategoryItemEntity) entity;
		Comparable<?> serie = itemEntity.getRowKey();
		Map<Comparable<?>,JRPrintHyperlink> serieHyperlinks = itemHyperlinks.get(serie);
		if (serieHyperlinks != null)
		{
			Comparable<?> category = itemEntity.getColumnKey();
			printHyperlink = serieHyperlinks.get(category);
		}
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:CategoryChartHyperlinkProvider.java


示例5: startHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
/**
 *
 */
protected boolean startHyperlink(JRPrintHyperlink link, boolean isText, boolean isOnePagePerSheet)
{
	String href = null;

	String ignLnkPropName = getIgnoreHyperlinkProperty();
	Boolean ignoreHyperlink = HyperlinkUtil.getIgnoreHyperlink(ignLnkPropName, link);
	if (ignoreHyperlink == null)
	{
		ignoreHyperlink = JRPropertiesUtil.getInstance(getJasperReportsContext()).getBooleanProperty(jasperPrint, ignLnkPropName, false);
	}

	if (!ignoreHyperlink)
	{
		href = documentBuilder.getHyperlinkURL(link, isOnePagePerSheet);
	}
	
	if (href != null)
	{
		writeHyperlink(link, href, isText);
	}

	return href != null;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:TableBuilder.java


示例6: getHyperlinkTarget

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
/**
 *
 */
protected String getHyperlinkTarget(JRPrintHyperlink link)
{
	String target = null;
	switch(link.getHyperlinkTargetValue())
	{
		case SELF :
		{
			target = "_self";
			break;
		}
		case BLANK :
		default :
		{
			target = "_blank";
			break;
		}
	}
	return target;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:TableBuilder.java


示例7: getHyperlinkTarget

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
protected String getHyperlinkTarget(JRPrintHyperlink link)
{
	String target = null;
	switch(link.getHyperlinkTargetValue())
	{
		case SELF :
		{
			target = "_self";
			break;
		}
		case BLANK :
		default :
		{
			target = "_blank";
			break;
		}
	}
	return target;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:JRPptxExporter.java


示例8: evaluateHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
/**
 * Evaluate a hyperlink specification.
 * 
 * @param hyperlink the hyperlink specification
 * @param expressionEvaluator the expression evaluator to use for evaluation the hyperlink expressions
 * @param evaluationType the evaluation type, as in {@link JRFillExpressionEvaluator#evaluate(JRExpression, byte) JRFillExpressionEvaluator.evaluate(JRExpression, byte)}
 * @return a {@link JRPrintHyperlink print hyperlink} resulted from the expression evaluations.
 * @throws JRException
 */
public static JRPrintHyperlink evaluateHyperlink(JRHyperlink hyperlink,
		JRFillExpressionEvaluator expressionEvaluator,
		byte evaluationType) throws JRException
{
	if (hyperlink == null)
	{
		return null;
	}
	
	Boolean hyperlinkWhen = (Boolean) expressionEvaluator.evaluate(hyperlink.getHyperlinkWhenExpression(), evaluationType);
	if (hyperlink.getHyperlinkWhenExpression() != null && Boolean.TRUE.equals(hyperlinkWhen))
	{
		return null;
	}
	
	JRBasePrintHyperlink printHyperlink = new JRBasePrintHyperlink();
	printHyperlink.setLinkType(hyperlink.getLinkType());
	printHyperlink.setLinkTarget(hyperlink.getLinkTarget());
	printHyperlink.setHyperlinkReference((String) expressionEvaluator.evaluate(hyperlink.getHyperlinkReferenceExpression(), evaluationType));
	printHyperlink.setHyperlinkAnchor((String) expressionEvaluator.evaluate(hyperlink.getHyperlinkAnchorExpression(), evaluationType));
	printHyperlink.setHyperlinkPage((Integer) expressionEvaluator.evaluate(hyperlink.getHyperlinkPageExpression(), evaluationType));
	printHyperlink.setHyperlinkTooltip((String) expressionEvaluator.evaluate(hyperlink.getHyperlinkTooltipExpression(), evaluationType));
	printHyperlink.setHyperlinkParameters(evaluateHyperlinkParameters(hyperlink, expressionEvaluator, evaluationType));
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:35,代码来源:JRFillHyperlinkHelper.java


示例9: hyperlinkClicked

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
protected void hyperlinkClicked(JRPrintHyperlink hyperlink)
{
	try
	{
		JRHyperlinkListener listener = null;
		for(int i = 0; i < hyperlinkListeners.size(); i++)
		{
			listener = hyperlinkListeners.get(i);
			listener.gotoHyperlink(hyperlink);
		}
	}
	catch(JRException e)
	{
		if (log.isErrorEnabled())
		{
			log.error("Hyperlink click error.", e);
		}

		JOptionPane.showMessageDialog(this, viewerContext.getBundleString("error.hyperlink"));
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:JRViewerPanel.java


示例10: getHyperlinkAt

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
private JRPrintHyperlink getHyperlinkAt(int x, int y) {
	Rectangle b = reportImage.getBounds();
	Rectangle ca = getClientArea();

	int oX = b.width <= ca.width ? (ca.width - b.width) / 2 : -getHorizontalBar().getSelection() + MARGIN;
	int oY = b.height <= ca.height ? (ca.height - b.height) / 2 : -getVerticalBar().getSelection() + MARGIN;

	Point point = new Point((int) ((x - oX - ca.x) / zoom), (int) ((y - oY - ca.y) / zoom));

	for (ListIterator<IHyperlinkContainer> it = links.listIterator(links.size()); it.hasPrevious();) {
		JRPrintHyperlink hyperlink = it.previous().getHyperlink(point);
		if (hyperlink != null)
			return hyperlink;
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:ViewerCanvas.java


示例11: initHypelinks

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
private void initHypelinks() {
	links.clear();
	if (page == null)
		return;
	List<JRPrintElement> elements = page.getElements();
	if (elements == null)
		return;

	for (JRPrintElement element : elements) {
		if (element instanceof JRPrintImage) {
			Renderable r = ((JRPrintImage) element).getRenderable();
			if (r instanceof ImageMapRenderable) {
				try {
					List<JRPrintImageAreaHyperlink> hyperlinks = ((ImageMapRenderable) r).getImageAreaHyperlinks(new java.awt.Rectangle(0, 0, element.getWidth(), element.getHeight()));
					if (hyperlinks != null)
						links.add(new ImageAreaHyperlink(element.getX(), element.getY(), hyperlinks));
				} catch (JRException e) {
					throw new RuntimeException(e);
				}
			}
		} else if (element instanceof JRPrintHyperlink && !((JRPrintHyperlink) element).getHyperlinkTypeValue().equals(HyperlinkTypeEnum.NONE))
			links.add(new PrintHyperlink(0, 0, element));
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:ViewerCanvas.java


示例12: 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


示例13: hyperlinkClicked

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
protected void hyperlinkClicked(JRPrintHyperlink hyperlink)
{
	try
	{
		JRHyperlinkListener listener = null;
		for(int i = 0; i < hyperlinkListeners.size(); i++)
		{
			listener = hyperlinkListeners.get(i);
			listener.gotoHyperlink(hyperlink);
		}
	}
	catch(JRException e)
	{
		if (log.isErrorEnabled())
		{
			log.error("Hyperlink click error.", e);
		}
		JOptionPane.showMessageDialog(this, getBundleString("error.hyperlink"));
	}
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:21,代码来源:JRViewer.java


示例14: hyperlinkClicked

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
/**
*/
void hyperlinkClicked(MouseEvent evt)
{
	JPanel link = (JPanel)evt.getSource();
	JRPrintHyperlink element = (JRPrintHyperlink)linksMap.get(link);
	hyperlinkClicked(element);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:JRViewer300.java


示例15: 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


示例16: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
/**
 * Determines the provider for the chart entity based on its dataset,
 * and delegates the call to it.
 */
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink hyperlink = null;
	ChartHyperlinkProvider provider = resolveEntityProvider(entity);
	if (provider != null && provider.hasHyperlinks())
	{
		hyperlink = provider.getEntityHyperlink(entity);
	}
	return hyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:MultiAxisChartHyperlinkProvider.java


示例17: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof PieSectionEntity)
	{
		PieSectionEntity pieEntity = (PieSectionEntity) entity;
		printHyperlink = sectionHyperlinks.get(pieEntity.getSectionKey());
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:PieChartHyperlinkProvider.java


示例18: getEntityHyperlink

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
public JRPrintHyperlink getEntityHyperlink(ChartEntity entity)
{
	JRPrintHyperlink printHyperlink = null;
	if (hasHyperlinks() && entity instanceof XYItemEntity)
	{
		XYItemEntity itemEntity = (XYItemEntity) entity;
		int item = itemEntity.getItem();
		if (item >= 0 && item < itemHyperlinks.size())
		{
			printHyperlink = itemHyperlinks.get(item);
		}
	}
	return printHyperlink;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:HighLowChartHyperlinkProvider.java


示例19: customIncrement

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
protected void customIncrement()
{
	if (xyzSeries != null && xyzSeries .length > 0)
	{
		for (int i = 0; i < xyzSeries.length; i++)
		{
			JRFillXyzSeries crtXyzSeries = xyzSeries[i];
			
			Comparable<?> seriesName = crtXyzSeries.getSeries();
			if (seriesName == null)
			{
				throw 
					new JRRuntimeException(
						EXCEPTION_MESSAGE_KEY_SERIES_NULL_NAME,  
						(Object[])null 
						);
			}

			dataset.addValue(
				crtXyzSeries.getSeries(), 
				crtXyzSeries.getXValue(),
				crtXyzSeries.getYValue(),
				crtXyzSeries.getZValue()
				);
			
			if (crtXyzSeries.hasItemHyperlinks())
			{
				Map<Pair, JRPrintHyperlink> seriesLinks = itemHyperlinks.get(crtXyzSeries.getSeries());
				if (seriesLinks == null)
				{
					seriesLinks = new HashMap<Pair, JRPrintHyperlink>();
					itemHyperlinks.put(crtXyzSeries.getSeries(), seriesLinks);
				}
				Pair<Number,Number> xyKey = new Pair<Number,Number>(crtXyzSeries.getXValue(), crtXyzSeries.getYValue());
				seriesLinks.put(xyKey, crtXyzSeries.getPrintItemHyperlink());
			}
		}
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:41,代码来源:JRFillXyzDataset.java


示例20: customInitialize

import net.sf.jasperreports.engine.JRPrintHyperlink; //导入依赖的package包/类
@Override
protected void customInitialize()
{
	values = new LinkedHashMap<Comparable<?>, Number>();
	labels = new HashMap<Comparable<?>, String>();
	sectionHyperlinks = new HashMap<Comparable<?>, JRPrintHyperlink>();
	
	// read property here because fill dataset is null on constructor
	ignoreDuplicatedKey = 
		getFiller().getPropertiesUtil().getBooleanProperty(
			getFillDataset(), 
			PROPERTY_IGNORE_DUPLICATED_KEY, 
			false
			);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:JRFillPieDataset.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LocalSessionFactoryBuilder类代码示例发布时间:2022-05-22
下一篇:
Java ResizedEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap