Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintElement


    JRLineBox lineBox = gridCell.getBox();
    if (lineBox != null)
    {
      setBox(lineBox);
    }
    JRPrintElement element = gridCell.getElement();
    if (element instanceof JRCommonGraphicElement)
    {
      setPen(((JRCommonGraphicElement)element).getLinePen());
    }
View Full Code Here


      TransformerContext context, String transformerExportKey,
      List elements)
  {
    for (ListIterator it = elements.listIterator(); it.hasNext();)
    {
      JRPrintElement element = (JRPrintElement) it.next();
      if (element instanceof JRGenericPrintElement)
      {
        JRGenericPrintElement genericElement =
          (JRGenericPrintElement) element;
        GenericElementTransformer handler =
            (GenericElementTransformer) GenericElementHandlerEnviroment.getHandler(
            genericElement.getGenericType(), transformerExportKey);
        if (handler != null && handler.toExport(genericElement))
        {
          JRPrintElement transformed = handler.transformElement(
              context, genericElement);
         
          if (log.isDebugEnabled())
          {
            log.debug("Transformed element " + genericElement
View Full Code Here

    Collection elements = fillSubreport.getPrintElements();
    if (elements != null)
    {
      for (Iterator it = elements.iterator(); it.hasNext();)
      {
        JRPrintElement element = (JRPrintElement) it.next();
        printFrame.addElement(element);
      }
    }
   
    return printFrame;
View Full Code Here

     
      int positionY = getStretchHeight() - positionOffset;
      boolean outside = false;
      for (Iterator it = printElements.iterator(); !outside && it.hasNext();)
      {
        JRPrintElement element = (JRPrintElement) it.next();
        outside = element.getY() + element.getHeight() > positionY;
      }
     
      if (!outside)
      {
        for (Iterator it = printElements.iterator(); it.hasNext();)
        {
          JRPrintElement element = (JRPrintElement) it.next();
          element.setY(element.getY() + positionOffset);
        }
      }
    }
  }
View Full Code Here

  {
    if(elements != null && elements.size() > 0)
    {
      for(Iterator it = elements.iterator(); it.hasNext();)
      {
        JRPrintElement element = (JRPrintElement)it.next();

        JRImageMapRenderer imageMap = null;
        if (element instanceof JRPrintImage)
        {
          JRRenderable renderer = ((JRPrintImage) element).getRenderer();
          if (renderer instanceof JRImageMapRenderer)
          {
            imageMap = (JRImageMapRenderer) renderer;
            if (!imageMap.hasImageAreaHyperlinks())
            {
              imageMap = null;
            }
          }
        }
        boolean hasImageMap = imageMap != null;

        JRPrintHyperlink hyperlink = null;
        if (element instanceof JRPrintHyperlink)
        {
          hyperlink = (JRPrintHyperlink) element;
        }
        boolean hasHyperlink = !hasImageMap
          && hyperlink != null && hyperlink.getHyperlinkTypeValue() != HyperlinkTypeEnum.NONE;
        boolean hasTooltip = hyperlink != null && hyperlink.getHyperlinkTooltip() != null;

        if (hasHyperlink || hasImageMap || hasTooltip)
        {
          JPanel link;
          if (hasImageMap)
          {
            Rectangle renderingArea = new Rectangle(0, 0, element.getWidth(), element.getHeight());
            link = new ImageMapPanel(renderingArea, imageMap);
          }
          else //hasImageMap
          {
            link = new JPanel();
            if (hasHyperlink)
            {
              link.addMouseListener(mouseListener);
            }
          }

          if (hasHyperlink)
          {
            link.setCursor(new Cursor(Cursor.HAND_CURSOR));
          }

          link.setLocation(
            (int)((element.getX() + offsetX) * realZoom),
            (int)((element.getY() + offsetY) * realZoom)
            );
          link.setSize(
            (int)(element.getWidth() * realZoom),
            (int)(element.getHeight() * realZoom)
            );
          link.setOpaque(false);

          String toolTip = getHyperlinkTooltip(hyperlink);
          if (toolTip == null && hasImageMap)
View Full Code Here

  /**
   *
   */
  public void visitChart(JRChart chart)
  {
    JRPrintElement printImage = ChartConverter.getInstance().convert(reportConverter, chart);
    addElement(parentFrame, printImage);
    addContour(reportConverter, parentFrame, printImage);
  }
View Full Code Here

  /**
   *
   */
  public void visitCrosstab(JRCrosstab crosstab)
  {
    JRPrintElement printFrame = CrosstabConverter.getInstance().convert(reportConverter, crosstab);
    addElement(parentFrame, printFrame);
    addContour(reportConverter, parentFrame, printFrame);
  }
View Full Code Here

  /**
   *
   */
  public void visitFrame(JRFrame frame)
  {
    JRPrintElement printFrame = FrameConverter.getInstance().convert(reportConverter, frame);
    addElement(parentFrame, printFrame);
    addContour(reportConverter, parentFrame, printFrame);
  }
View Full Code Here

  /**
   *
   */
  public void visitImage(JRImage image)
  {
    JRPrintElement printImage = ImageConverter.getInstance().convert(reportConverter, image);
    addElement(parentFrame, printImage);
    addContour(reportConverter, parentFrame, printImage);
  }
View Full Code Here

  /**
   *
   */
  public void visitStaticText(JRStaticText staticText)
  {
    JRPrintElement printText = StaticTextConverter.getInstance().convert(reportConverter, staticText);
    addElement(parentFrame, printText);
    addContour(reportConverter, parentFrame, printText);
  }
View Full Code Here

TOP

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

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.