Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRComponentElement


    dataset.finishDataset();

    chartHyperlinkProvider = new CategoryChartHyperlinkProvider(dataset.getItemHyperlinks());
    bookmarkLevel = getChartSettings().getBookmarkLevel();
   
    JRComponentElement element = fillContext.getComponentElement()

    SpiderChartSharedBean spiderChartSharedBean = new SpiderChartSharedBean(
        getChartSettings().getRenderType(),
        maxValue,
        titleText,
View Full Code Here


  }


  public JRPrintElement fill()
  {
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateImage templateImage = new JRTemplateImage(fillContext.getElementOrigin(),
        fillContext.getDefaultStyleProvider());
    templateImage.setStyle(fillContext.getElementStyle());
    templateImage.setLinkType(getLinkType());
    templateImage.setLinkTarget(getLinkTarget());
   
    JRTemplatePrintImage image = new JRTemplatePrintImage(templateImage);
    image.setX(element.getX());
    image.setY(fillContext.getElementPrintY());
    image.setWidth(element.getWidth());
    image.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
      copy(image);
    }
View Full Code Here

  }

  public JRPrintElement convert(ReportConverter reportConverter,
      JRElement element)
  {
    JRComponentElement componentElement = (JRComponentElement) element;
    JRPrintElement converted = null;
    ComponentKey componentKey = componentElement.getComponentKey();
    if (componentKey != null)
    {
      ComponentManager manager = ComponentsEnvironment.getComponentManager(
          componentKey);
      if (manager != null && manager.getDesignConverter() != null)
View Full Code Here

  public JRPrintElement fill()
  {
    JRTemplateImage templateImage = getTemplateImage();
   
    JRTemplatePrintImage image = new JRTemplatePrintImage(templateImage);
    JRComponentElement element = fillContext.getComponentElement();
    image.setX(element.getX());
    image.setY(fillContext.getElementPrintY());
    image.setWidth(element.getWidth());
    image.setHeight(element.getHeight());
   
    if (isEvaluateNow())
    {
      setBarcodeImage(image);
    }
View Full Code Here

    dataset.evaluateDatasetRun(evaluation);
  }

  public JRPrintElement fill()
  {
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(
        fillContext.getElementOrigin(),
        fillContext.getDefaultStyleProvider(),
        CHART_PRINT_TYPE);
   
    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(template);
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
      copy(printElement);
    }
View Full Code Here

    dataset.evaluateDatasetRun(evaluation);
  }

  public JRPrintElement fill()
  {
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateGenericElement template = new JRTemplateGenericElement(
        fillContext.getElementOrigin(),
        fillContext.getDefaultStyleProvider(),
        CHART_PRINT_TYPE);
   
    JRTemplateGenericPrintElement printElement = new JRTemplateGenericPrintElement(template);
    printElement.setX(element.getX());
    printElement.setY(fillContext.getElementPrintY());
    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
      copy(printElement);
    }
View Full Code Here

  public JRPrintElement fill()
  {
    JRTemplateImage templateImage = getTemplateImage();
   
    JRTemplatePrintImage image = new JRTemplatePrintImage(templateImage);
    JRComponentElement element = fillContext.getComponentElement();
    image.setX(element.getX());
    image.setY(fillContext.getElementPrintY());
    image.setWidth(element.getWidth());
    image.setHeight(element.getHeight());
   
    if (isEvaluateNow())
    {
      setBarcodeImage(image);
    }
View Full Code Here

  public FillPrepareResult prepare(int availableHeight)
  {
    FillPrepareResult result = null;
   
    JRComponentElement element = fillContext.getComponentElement();
    if (template == null) {
      template = new JRTemplateGenericElement(
          fillContext.getElementOrigin(),
          fillContext.getDefaultStyleProvider(),
          HTML_COMPONENT_PRINT_TYPE);
   
      template.setMode(htmlComponent.getContext().getComponentElement().getModeValue());
      template.setBackcolor(htmlComponent.getContext().getComponentElement().getBackcolor());
      template.setForecolor(htmlComponent.getContext().getComponentElement().getForecolor());
    }
   
    printElement = new JRTemplateGenericPrintElement(template);
    printElement.setX(element.getX());

    printElement.setWidth(element.getWidth());
    printElement.setHeight(element.getHeight());
   
    if (isEvaluateNow())
    {
      copy(printElement);
    }
    else
    {
      fillContext.registerDelayedEvaluation(printElement,
          htmlComponent.getEvaluationTime(), null);
    }
   
    Dimension realSize = computeSizeOfPrintElement(printElement);
    int realHeight = realSize.height;
    int realWidth = realSize.width;
    int imageWidth = realWidth;
    int imageHeight = realHeight;
   
    if (htmlComponent.getScaleType() == ScaleImageEnum.REAL_SIZE || htmlComponent.getScaleType() == ScaleImageEnum.REAL_HEIGHT) {
     
      if (realWidth >  element.getWidth()) {
        double wRatio = ((double) element.getWidth()) / realWidth;
        imageHeight = (int) (wRatio * realHeight);
        imageWidth = element.getWidth();
      }
      int printElementHeight = Math.max(imageHeight, element.getHeight());
     
      if (imageHeight <= availableHeight) {
        result = FillPrepareResult.printStretch(printElementHeight, false);
      } else {
        result = FillPrepareResult.noPrintOverflow(printElementHeight);
      }
     
      if (htmlComponent.getScaleType() == ScaleImageEnum.REAL_SIZE) {
        printElement.setWidth(imageWidth);
      } else {
        printElement.setWidth(element.getWidth());
      }
      printElement.setHeight(printElementHeight);
     
    } else {
      result = FillPrepareResult.PRINT_NO_STRETCH;
View Full Code Here

    dataset.evaluateDatasetRun(evaluation);
  }

  public JRPrintElement fill()
  {
    JRComponentElement element = fillContext.getComponentElement();
    JRTemplateImage templateImage = new JRTemplateImage(fillContext.getElementOrigin(),
        fillContext.getDefaultStyleProvider());
    templateImage.setStyle(fillContext.getElementStyle());
   
    JRTemplatePrintImage image = new JRTemplatePrintImage(templateImage);
    image.setX(element.getX());
    image.setY(fillContext.getElementPrintY());
    image.setWidth(element.getWidth());
    image.setHeight(element.getHeight());

    if (isEvaluateNow())
    {
      copy(image);
    }
View Full Code Here

      ChartProperties chartProperties = new ChartProperties();
      AxisProperties axisProperties = new AxisProperties();
      LegendProperties legendProperties = new LegendProperties();

      JRComponentElement element = fillContext.getComponentElement();
      AxisChart axisChart = new AxisChart(dataSeries, chartProperties, axisProperties, legendProperties,
          element.getWidth(), element.getHeight());
     
      //creating an chart image because AxisChart objects fail on serialization
      BufferedImage img = getChartImage(axisChart);
      JRRenderable renderer = JRImageRenderer.getInstance(img, JRRenderable.IMAGE_TYPE_PNG,
          OnErrorTypeEnum.ERROR);
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRComponentElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.