Java 类net.sf.jasperreports.engine.export.JRXmlExporterContext 实例源码

项目:jasperreports    文件:ChartXml4SwfHandler.java   
public void exportElement(
    JRXmlExporterContext exporterContext,
    JRGenericPrintElement element
    )
{
    JRXml4SwfExporter exporter = (JRXml4SwfExporter)exporterContext.getExporterRef();

    JRPrintText text = getTextElementReplacement(exporterContext, element);

    try
    {
        exporter.exportText(text);
    }
    catch (IOException e)
    {
        throw new JRRuntimeException(e);
    }
}
项目:jasperreports    文件:MapElementXmlHandler.java   
@Override
public void exportElement(
        JRXmlExporterContext exporterContext,
    JRGenericPrintElement element
    )
{
    try
    {
        JRXmlExporter exporter = (JRXmlExporter)exporterContext.getExporterRef();
        exporter.exportImage(MapElementImageProvider.getImage(exporterContext.getJasperReportsContext(), element));
    }
    catch (Exception e)
    {
        throw new RuntimeException(e);
    }
}
项目:jasperreports-wms-component    文件:WmsMapElementXmlHandler.java   
@Override
public void exportElement(JRXmlExporterContext exporterContext,
    JRGenericPrintElement element) {
  try {
    JRXmlExporter exporter = (JRXmlExporter) exporterContext.getExporter();
    exporter.exportImage(getImage(exporterContext.getJasperReportsContext(),
        element));
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Exporta bullet para alternativa de questao
 * @param exporterContext
 * @param element
 * @param eqaKey
 */
protected void exportAlternativeBullet(JRXmlExporterContext exporterContext, JRGenericPrintElement element, Object eqaKey ) {
    int x = element.getX() + exporterContext.getOffsetX();
    int y = element.getY() - exporterContext.getOffsetY();
    int x2 = x + element.getWidth();
    int y2 = element.getY() - exporterContext.getOffsetY() - element.getHeight();

    int w = x2 - x;
    int h = y - y2;

    JRXmlExporter xmlExporter = (JRXmlExporter) exporterContext.getExporter();
    JRDefaultStyleProvider defaultStyleProvider = element.getDefaultStyleProvider();

    if (log.isDebugEnabled()) {
        log.debug("id=" + eqaKey + " x=" + x + ",y=" + y + ",w=" + w + ",h=" + h + "");
    }

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(defaultStyleProvider);

    //darcio 25/06/2013 nao sera mais necessario marcar a p�gina por aqui
    //Object actualPage = element.getParameterValue("actualPage");
    //ellipse.setKey("" + eqaKey + "-" + actualPage);

    ellipse.setKey("" + eqaKey);
    ellipse.setX(x);
    ellipse.setY(y);
    ellipse.setHeight(h);
    ellipse.setWidth(w);
    JRPrintText text = new JRBasePrintText(defaultStyleProvider);

    text.setForecolor(Color.RED);
    text.setX(x + 20);
    text.setY(y + 3);
    text.setHeight(10);
    text.setWidth(200);
    text.setText(eqaKey + " x=" + x + " y=" + y);

    try {
        xmlExporter.exportElement(ellipse);
        xmlExporter.exportText(text);
    } catch (Exception e) {
        throw new RuntimeException("Erro ao tentar exportar elemento", e);
    }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Exporta bullet para alternativa de questao
 * @param exporterContext
 * @param element
 * @param eqaKey
 */
protected void exportAlternativeBullet(JRXmlExporterContext exporterContext, JRGenericPrintElement element, Object eqaKey ) {
    int x = element.getX() + exporterContext.getOffsetX();
    int y = element.getY() - exporterContext.getOffsetY();
    int x2 = x + element.getWidth();
    int y2 = element.getY() - exporterContext.getOffsetY() - element.getHeight();

    int w = x2 - x;
    int h = y - y2;

    JRXmlExporter xmlExporter = (JRXmlExporter) exporterContext.getExporter();
    JRDefaultStyleProvider defaultStyleProvider = element.getDefaultStyleProvider();

    if (log.isDebugEnabled()) {
        log.debug("id=" + eqaKey + " x=" + x + ",y=" + y + ",w=" + w + ",h=" + h + "");
    }

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(defaultStyleProvider);

    //darcio 25/06/2013 nao sera mais necessario marcar a p�gina por aqui
    //Object actualPage = element.getParameterValue("actualPage");
    //ellipse.setKey("" + eqaKey + "-" + actualPage);

    ellipse.setKey("" + eqaKey);
    ellipse.setX(x);
    ellipse.setY(y);
    ellipse.setHeight(h);
    ellipse.setWidth(w);
    JRPrintText text = new JRBasePrintText(defaultStyleProvider);

    text.setForecolor(Color.RED);
    text.setX(x + 20);
    text.setY(y + 3);
    text.setHeight(10);
    text.setWidth(200);
    text.setText(eqaKey + " x=" + x + " y=" + y);

    try {
        xmlExporter.exportElement(ellipse);
        xmlExporter.exportText(text);
    } catch (Exception e) {
        throw new RuntimeException("Erro ao tentar exportar elemento", e);
    }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Exporta bullet para alternativa de questao
 * @param exporterContext
 * @param element
 * @param eqaKey
 */
protected void exportAlternativeBullet(JRXmlExporterContext exporterContext, JRGenericPrintElement element, Object eqaKey ) {
    int x = element.getX() + exporterContext.getOffsetX();
    int y = element.getY() - exporterContext.getOffsetY();
    int x2 = x + element.getWidth();
    int y2 = element.getY() - exporterContext.getOffsetY() - element.getHeight();

    int w = x2 - x;
    int h = y - y2;

    JRXmlExporter xmlExporter = (JRXmlExporter) exporterContext.getExporter();
    JRDefaultStyleProvider defaultStyleProvider = element.getDefaultStyleProvider();

    if (log.isDebugEnabled()) {
        log.debug("id=" + eqaKey + " x=" + x + ",y=" + y + ",w=" + w + ",h=" + h + "");
    }

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(defaultStyleProvider);

    Object actualPage = element.getParameterValue("actualPage");

    ellipse.setKey("" + eqaKey + "-" + actualPage);
    ellipse.setX(x);
    ellipse.setY(y);
    ellipse.setHeight(h);
    ellipse.setWidth(w);
    JRPrintText text = new JRBasePrintText(defaultStyleProvider);

    text.setForecolor(Color.RED);
    text.setX(x + 20);
    text.setY(y + 3);
    text.setHeight(10);
    text.setWidth(200);
    text.setText(eqaKey + " x=" + x + " y=" + y);

    try {
        xmlExporter.exportElement(ellipse);
        xmlExporter.exportText(text);
    } catch (Exception e) {
        throw new RuntimeException("Erro ao tentar exportar elemento", e);
    }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Exporta bullet para alternativa de questao
 * @param exporterContext
 * @param element
 * @param eqaKey
 */
protected void exportAlternativeBullet(JRXmlExporterContext exporterContext, JRGenericPrintElement element, Object eqaKey ) {
    int x = element.getX() + exporterContext.getOffsetX();
    int y = element.getY() - exporterContext.getOffsetY();
    int x2 = x + element.getWidth();
    int y2 = element.getY() - exporterContext.getOffsetY() - element.getHeight();

    int w = x2 - x;
    int h = y - y2;

    JRXmlExporter xmlExporter = (JRXmlExporter) exporterContext.getExporter();
    JRDefaultStyleProvider defaultStyleProvider = element.getDefaultStyleProvider();

    if (log.isDebugEnabled()) {
        log.debug("id=" + eqaKey + " x=" + x + ",y=" + y + ",w=" + w + ",h=" + h + "");
    }

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(defaultStyleProvider);

    Object actualPage = element.getParameterValue("actualPage");

    ellipse.setKey("" + eqaKey + "-" + actualPage);
    ellipse.setX(x);
    ellipse.setY(y);
    ellipse.setHeight(h);
    ellipse.setWidth(w);
    JRPrintText text = new JRBasePrintText(defaultStyleProvider);

    text.setForecolor(Color.RED);
    text.setX(x + 20);
    text.setY(y + 3);
    text.setHeight(10);
    text.setWidth(200);
    text.setText(eqaKey + " x=" + x + " y=" + y);

    try {
        xmlExporter.exportElement(ellipse);
        xmlExporter.exportText(text);
    } catch (Exception e) {
        throw new RuntimeException("Erro ao tentar exportar elemento", e);
    }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Exporta bullet para alternativa de questao
 * @param exporterContext
 * @param element
 * @param eqaKey
 */
protected void exportAlternativeBullet(JRXmlExporterContext exporterContext, JRGenericPrintElement element, Object eqaKey ) {
    int x = element.getX() + exporterContext.getOffsetX();
    int y = element.getY() - exporterContext.getOffsetY();
    int x2 = x + element.getWidth();
    int y2 = element.getY() - exporterContext.getOffsetY() - element.getHeight();

    int w = x2 - x;
    int h = y - y2;

    JRXmlExporter xmlExporter = (JRXmlExporter) exporterContext.getExporter();
    JRDefaultStyleProvider defaultStyleProvider = element.getDefaultStyleProvider();

    if (log.isDebugEnabled()) {
        log.debug("id=" + eqaKey + " x=" + x + ",y=" + y + ",w=" + w + ",h=" + h + "");
    }

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(defaultStyleProvider);

    Object actualPage = element.getParameterValue("actualPage");

    ellipse.setKey("" + eqaKey + "-" + actualPage);
    ellipse.setX(x);
    ellipse.setY(y);
    ellipse.setHeight(h);
    ellipse.setWidth(w);
    JRPrintText text = new JRBasePrintText(defaultStyleProvider);

    text.setForecolor(Color.RED);
    text.setX(x + 20);
    text.setY(y + 3);
    text.setHeight(10);
    text.setWidth(200);
    text.setText(eqaKey + " x=" + x + " y=" + y);

    try {
        xmlExporter.exportElement(ellipse);
        xmlExporter.exportText(text);
    } catch (Exception e) {
        throw new RuntimeException("Erro ao tentar exportar elemento", e);
    }
}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Especializa��o de GenericElementXmlHandler
 */
@Override
public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {

    Object eqaKey = element.getParameterValue("eqaKey");

    exportAlternativeBullet(exporterContext, element, eqaKey);

}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Especializa��o de GenericElementXmlHandler
 */
@Override
public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {

    Object eqaKey = element.getParameterValue("eqaKey");

    exportAlternativeBullet(exporterContext, element, eqaKey);

}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Especialização de GenericElementXmlHandler
 */
@Override
public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {

    Object eqaKey = element.getParameterValue("eqaKey");

    exportAlternativeBullet(exporterContext, element, eqaKey);

}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Especialização de GenericElementXmlHandler
 */
@Override
public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {

    Object eqaKey = element.getParameterValue("eqaKey");

    exportAlternativeBullet(exporterContext, element, eqaKey);

}
项目:omr    文件:JazzOMRXMLHandler.java   
/**
 * Especialização de GenericElementXmlHandler
 */
@Override
public void exportElement(JRXmlExporterContext exporterContext, JRGenericPrintElement element) {

    Object eqaKey = element.getParameterValue("eqaKey");

    exportAlternativeBullet(exporterContext, element, eqaKey);

}