Java 类net.sf.jasperreports.engine.fill.JRTemplateGenericElement 实例源码

项目:dynamicreports-jasper    文件:GeoMapFillComponent.java   
@Override
public JRPrintElement fill() {
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(fillContext.getElementOrigin(),
            fillContext.getDefaultStyleProvider(), GeoMapPrintElement.GEOMAP_ELEMENT_TYPE);

    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(template, printElementOriginator);
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow()) {
        copy(printElement);
    } else {
        fillContext.registerDelayedEvaluation(printElement, geoMapComponent.getEvaluationTime(), geoMapComponent.getEvaluationGroup());
    }

    return printElement;
}
项目:jasperreports-wms-component    文件:WmsMapFillComponent.java   
@Override
public JRPrintElement fill() {
  JRComponentElement element = fillContext.getComponentElement();
  JRTemplateGenericElement template = new JRTemplateGenericElement(
      fillContext.getElementOrigin(),
      fillContext.getDefaultStyleProvider(),
      WmsMapPrintElement.WMS_MAP_ELEMENT_TYPE);
  template = deduplicate(template);

  JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(
      template, elementId);
  printElement.setUUID(element.getUUID());
  printElement.setX(element.getX());
  printElement.setY(fillContext.getElementPrintY());
  printElement.setWidth(element.getWidth());
  printElement.setHeight(element.getHeight());

  if (isEvaluateNow()) {
    copy(printElement);
  } else {
    fillContext.registerDelayedEvaluation(printElement,
        mapComponent.getEvaluationTime(), mapComponent.getEvaluationGroup());
  }

  return printElement;
}
项目:jasperreports    文件:FillPieChart.java   
public JRPrintElement fill()
{
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(
            fillContext.getElementOrigin(), 
            fillContext.getDefaultStyleProvider(),
            CHART_PRINT_TYPE);

    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(
            template, printElementOriginator);
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
        copy(printElement);
    }
    else
    {
        fillContext.registerDelayedEvaluation(printElement, 
                chart.getEvaluationTime(), chart.getEvaluationGroup());
    }

    return printElement;
}
项目:jasperreports    文件:FillBarChart.java   
public JRPrintElement fill()
{
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(
            fillContext.getElementOrigin(), 
            fillContext.getDefaultStyleProvider(),
            CHART_PRINT_TYPE);

    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(
            template, printElementOriginator);
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
        copy(printElement);
    }
    else
    {
        fillContext.registerDelayedEvaluation(printElement, 
                chart.getEvaluationTime(), chart.getEvaluationGroup());
    }

    return printElement;
}
项目:jasperreports    文件:MapFillComponent.java   
@Override
public JRPrintElement fill()
{
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(
            fillContext.getElementOrigin(), 
            fillContext.getDefaultStyleProvider(),
            MapComponent.MAP_ELEMENT_TYPE);
    template = deduplicate(template);
    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(template, printElementOriginator);
    printElement.setUUID(element.getUUID());
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
        copy(printElement);
    }
    else
    {
        fillContext.registerDelayedEvaluation(printElement, 
                mapComponent.getEvaluationTime(), mapComponent.getEvaluationGroup());
    }

    return printElement;
}
项目:jasperreports    文件:GenericElementTest.java   
protected JRTemplateGenericPrintElement genericElement()
{
    JRTemplateGenericElement template = genericTemplate();
    JRTemplateGenericPrintElement element = new JRTemplateGenericPrintElement(template, new DefaultPrintElementOriginator(12));
    setElement(element);
    return element;
}
项目:jasperreports    文件:GenericElementTest.java   
protected JRTemplateGenericElement genericTemplate()
{
    JRGenericElementType type = new JRGenericElementType(JRXmlConstants.JASPERREPORTS_NAMESPACE, "test");
    JRTemplateGenericElement template = new JRTemplateGenericElement(null, null, type);
    return template;
}