當前位置: 首頁>>代碼示例>>Java>>正文


Java JRPenUtil類代碼示例

本文整理匯總了Java中net.sf.jasperreports.engine.util.JRPenUtil的典型用法代碼示例。如果您正苦於以下問題:Java JRPenUtil類的具體用法?Java JRPenUtil怎麽用?Java JRPenUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JRPenUtil類屬於net.sf.jasperreports.engine.util包,在下文中一共展示了JRPenUtil類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createObject

import net.sf.jasperreports.engine.util.JRPenUtil; //導入依賴的package包/類
@Override
public Object createObject(Attributes atts)
{
	JRBasePrintGraphicElement graphicElement = (JRBasePrintGraphicElement)digester.peek();
	
	PenEnum pen = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_pen));
	if (pen != null)
	{
		if (log.isWarnEnabled())
		{
			log.warn("The 'pen' attribute is deprecated. Use the <pen> tag instead.");
		}
		JRPenUtil.setLinePenFromPen(pen, graphicElement.getLinePen());
	}

	FillEnum fill = FillEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_fill));
	if (fill != null)
	{
		graphicElement.setFill(fill);
	}

	return graphicElement;
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:24,代碼來源:JRPrintGraphicElementFactory.java

示例2: createObject

import net.sf.jasperreports.engine.util.JRPenUtil; //導入依賴的package包/類
@Override
public Object createObject(Attributes atts)
{
	JRDesignGraphicElement graphicElement = (JRDesignGraphicElement)digester.peek();
	
	StretchTypeEnum stretchType = StretchTypeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_stretchType));
	if (stretchType != null)
	{
		if (log.isWarnEnabled())
		{
			log.warn("The 'stretchType' attribute in <graphicElement> tag is deprecated. Use the same attribut in <reportElement> tag instead.");
		}
			
		graphicElement.setStretchType(stretchType);
	}

	PenEnum pen = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_pen));
	if (pen != null)
	{
		if (log.isWarnEnabled())
		{
			log.warn("The 'pen' attribute is deprecated. Use the <pen> tag instead.");
		}
			
		JRPenUtil.setLinePenFromPen(pen, graphicElement.getLinePen());
	}

	FillEnum fill = FillEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_fill));
	if (fill != null)
	{
		graphicElement.setFill(fill);
	}

	return graphicElement;
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:36,代碼來源:JRGraphicElementFactory.java

示例3: setPen

import net.sf.jasperreports.engine.util.JRPenUtil; //導入依賴的package包/類
public void setPen(JRPen pen)
{
    if (pen == null)
    {
        setPaintProvider(null);
        setStroke(null);
    }
    else
    {
        setPaintProvider(new ColorProvider(pen.getLineColor()));
        setStroke(JRPenUtil.getStroke(pen, BasicStroke.CAP_SQUARE));
    }
}
 
開發者ID:JockiHendry,項目名稱:ireport-fork,代碼行數:14,代碼來源:AbstractPenProperty.java


注:本文中的net.sf.jasperreports.engine.util.JRPenUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。