コード例 #1
0
  protected void setSubreport(JRSubreport subreport) {
    super.setElement(subreport);

    // don't want to inherit mode because of different defaults for rectangles and subreports
    setMode(subreport.getMode());

    linePen = new JRBasePen(this);

    getLinePen().setLineWidth(0f);
    setFill(JRGraphicElement.FILL_SOLID);
  }
  protected JRFillSubreport(
      JRBaseFiller filler, JRSubreport subreport, JRFillObjectFactory factory) {
    super(filler, subreport, factory);

    parameters = subreport.getParameters();
    JRSubreportReturnValue[] subrepReturnValues = subreport.getReturnValues();
    if (subrepReturnValues != null) {
      List<JRFillSubreportReturnValue> returnValuesList =
          new ArrayList<JRFillSubreportReturnValue>(subrepReturnValues.length * 2);

      returnValues = new JRFillSubreportReturnValue[subrepReturnValues.length];
      for (int i = 0; i < subrepReturnValues.length; i++) {
        addReturnValue(subrepReturnValues[i], returnValuesList, factory);
      }

      returnValues = new JRFillSubreportReturnValue[returnValuesList.size()];
      returnValuesList.toArray(returnValues);
    }

    loadedEvaluators = new HashMap<JasperReport, JREvaluator>();
    checkedReports = new HashSet<JasperReport>();
  }