}
}
public JRPrintElement fill()
{
JRTemplatePrintFrame printFrame = new JRTemplatePrintFrame(getFrameTemplate());
printFrame.setX(fillContext.getComponentElement().getX());
printFrame.setY(fillContext.getElementPrintY());
printFrame.setWidth(fillWidth);
printFrame.setHeight(fillSubreport.getContentsStretchHeight());
List styles = fillSubreport.getSubreportStyles();
for (Iterator it = styles.iterator(); it.hasNext();)
{
JRStyle style = (JRStyle) it.next();
try
{
fillContext.getFiller().addPrintStyle(style);
}
catch (JRException e)
{
throw new JRRuntimeException(e);
}
}
List origins = fillSubreport.getSubreportOrigins();
for (Iterator it = origins.iterator(); it.hasNext();)
{
JROrigin origin = (JROrigin) it.next();
fillContext.getFiller().getJasperPrint().addOrigin(origin);
}
Collection elements = fillSubreport.getPrintElements();
if (elements != null)
{
for (Iterator it = elements.iterator(); it.hasNext();)
{
JRPrintElement element = (JRPrintElement) it.next();
printFrame.addElement(element);
}
}
return printFrame;
}