Examples of JRDesignTextField


Examples of net.sf.jasperreports.engine.design.JRDesignTextField

    ctRowGroup.setTotalPosition(BucketDefinition.TOTAL_POSITION_END); //FIXME the total can be at the end of a group or at the beginin

    totalHeaderContent.setBackcolor(colors[colors[0].length/2][0]);
    totalHeaderContent.setMode(new Byte(Transparency.OPAQUE.getValue()));

    JRDesignTextField element = new JRDesignTextField();
    JRDesignExpression exp = ExpressionUtils.createExpression("\"Total "+crosstabRow.getTitle()+"\"",String.class);
    element.setExpression(exp);
    element.setHeight(crosstabRow.getHeight());

    if (crosstabRow.getTotalHeaderStyle() != null)
      layoutManager.applyStyleToElement(crosstabRow.getTotalHeaderStyle(), element);

    //The width can be the sum of the with of all the rows starting from the current one, up to the inner most one.
    int auxWidth = 0;
    boolean found = false;
    for (Iterator iterator = djcross.getRows().iterator(); iterator.hasNext();) {
      DJCrosstabRow row = (DJCrosstabRow) iterator.next();
      if (!row.equals(crosstabRow) && found == false){
        continue;
      } else {
        found = true;
      }

      auxWidth += row.getHeaderWidth();
    }
    element.setWidth(auxWidth);

    applyCellBorder(totalHeaderContent);

    totalHeaderContent.addElement(element);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.