Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRElement


    for (Iterator it = cell.getChildren().iterator(); it.hasNext();)
    {
      JRChild child = (JRChild) it.next();
      if (child instanceof JRElement)
      {
        JRElement element = (JRElement) child;
        // clone the element in order to set the frame as group
        element = (JRElement) element.clone(frame);
        if (width != originalWidth)
        {
          scaleCellElement(element, originalWidth, width);
         
          if (element instanceof JRElementGroup)//i.e. frame
View Full Code Here


      JRElement[] elements = listContents.getElements();
      if (elements != null)
      {
        for (int i = 0; i < elements.length; i++)
        {
          JRElement element = elements[i];
         
          verifier.verifyElement(element);
         
          if (element.getX() < 0 || element.getY() < 0)
          {
            verifier.addBrokenRule("Element must be placed at positive coordinates.",
                element);
          }
         
          if (element.getY() + element.getHeight() > listContents.getHeight())
          {
            verifier.addBrokenRule("Element reaches outside list contents height: y = "
                + element.getY() + ", height = " + element.getHeight()
                + ", list contents height = " + listContents.getHeight() + ".", element);
          }
         
          if (element.getX() + element.getWidth() > contentsWidth)
          {
            verifier.addBrokenRule("Element reaches outside list contents width: x = "
                + element.getX() + ", width = " + element.getWidth()
                + ", list contents width = " + contentsWidth + ".", element);
          }
        }
      }
    }
View Full Code Here

  /**
   *
   */
  public int compare(Object obj1, Object obj2)
  {
    JRElement elem1 = (JRElement)obj1;
    JRElement elem2 = (JRElement)obj2;
   
    return elem1.getY() - elem2.getY();
  }
View Full Code Here

  private static void collectDeepElements(JRElement[] elements, List deepElementsList)
  {
    for (int i = 0; i < elements.length; i++)
    {
      JRElement element = elements[i];
      deepElementsList.add(element);
     
      if (element instanceof JRFillFrame)
      {
        JRFrame frame = (JRFrame) element;
View Full Code Here

  /**
   *
   */
  public static JRElement getElementByKey(JRElement[] elements, String key)
  {
    JRElement element = null;
   
    if (key != null)
    {
      if (elements != null)
      {
        int i = 0;
        while (element == null && i < elements.length)
        {
          JRElement elem = elements[i];
          if (key.equals(elem.getKey()))
          {
            element = elem;
          }
          else if (elem instanceof JRFrame)
          {
View Full Code Here

    return whenNoDataCell;
  }
 
  public static JRElement getElementByKey(JRCrosstab crosstab, String key)
  {
    JRElement element = null;
   
    if (crosstab.getHeaderCell() != null)
    {
      element = crosstab.getHeaderCell().getElementByKey(key);
    }
View Full Code Here

    return element;
  }

  private static JRElement getHeadersElement(JRCrosstabGroup[] groups, String key)
  {
    JRElement element = null;
   
    if (groups != null)
    {
      for (int i = 0; element == null && i < groups.length; i++)
      {
View Full Code Here

      && elements != null && elements.length > 0
      )
    {
      for(int i = 0; i < elements.length; i++)
      {
        JRElement element = elements[i];
        int bottom = element.getY() + element.getHeight();
        breakHeight = bottom < breakHeight ? bottom : breakHeight;
      }
    }

    initElements();
View Full Code Here

      return;
    }
   
    for(int index = 1; index < elements.length; index++)
    {
      JRElement element = elements[index];
      if (!isAllowedToOverlap(element))
      {
        for (int overlapIndex = 0; overlapIndex < index; ++overlapIndex)
        {
          if (!isAllowedToOverlap(elements[overlapIndex]))
View Full Code Here

          }
        }

        for(int index = 0; index < elements.length; index++)
        {
          JRElement element = elements[index];

          verifyPrintWhenExpr(element);

          /*
          if (element.getY() < 0)
          {
            System.out.println(
              "Warning : Element placed outside band area : y=" + element.getY()
              );
            //addBrokenRule("Element placed outside band area.");
          }
          else if (element.getY() + element.getHeight() > band.getHeight())
          */
          if (element.getY() + element.getHeight() > band.getHeight())
          {
//            if (log.isWarnEnabled())
//              log.warn(
//                "Warning : Element bottom reaches outside band area : y=" + element.getY() +
//                " height=" + element.getHeight() +
//                " band-height=" + band.getHeight()
//                );
            addBrokenRule(
              "Warning : Element bottom reaches outside band area : y=" + element.getY() +
              " height=" + element.getHeight() +
              " band-height=" + band.getHeight(),
              element
              );
          }

View Full Code Here

TOP

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

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.