本文整理匯總了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;
}
示例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;
}
示例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));
}
}