本文整理汇总了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));
}
}