Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.Band


    group.getFooter().getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(15));

    report.addGroup(group);

    final Band b = new Band();
    b.setName("variables");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.FALSE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
//    b.setLayoutCacheable(false);

    for (int i = 3, max = tableModel.getColumnCount(); i < max; ++i)
    {
      TextFieldElementFactory tFF = new TextFieldElementFactory();
      tFF.setFieldname(tableModel.getColumnName(i));
      tFF.setAbsolutePosition(new Point2D.Float(200 * (i - 3), 0));
      tFF.setMinimumSize(new FloatDimension(200, 12));
      b.addElement(tFF.createElement());
    }
    report.getItemBand().addElement(b);

    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }
View Full Code Here


      final URL url = ObjectUtilities.getResourceRelative
          ("resources/subband.xml", SubBandParsingTest.class);
      assertNotNull(url);
      final MasterReport report = ReportGenerator.getInstance().parseReport(url);

      final Band band = report.getReportHeader();
      assertEquals(2, band.getElementCount());
      for (int i = 0; i < 2; i++)
      {
        final Band subband = (Band) band.getElement(i);
        assertEquals(2, subband.getElementCount());
        for (int x = 0; x < 2; x++)
        {
          final Band bandLowest = (Band) subband.getElement(x);
          assertTrue(bandLowest.getElementCount() > 0);
        }
      }
    }
    catch (Exception e)
    {
View Full Code Here

      elementHandlers.add(readHandler);
      return readHandler;
    }
    else if ("band".equals(tagName))
    {
      final XmlReadHandler readHandler = new BandReadHandler(new Band());
      elementHandlers.add(readHandler);
      return readHandler;
    }
    return null;
  }
View Full Code Here

   */
  protected void doneParsing()
      throws SAXException
  {
    super.doneParsing();
    final Band band = (Band) getElement();
    for (int i = 0; i < elementHandlers.size(); i++)
    {
      final ElementReadHandler readHandler = (ElementReadHandler) elementHandlers.get(i);
      band.addElement(readHandler.getElement());
    }
    for (int i = 0; i < styleExpressionHandlers.size(); i++)
    {
      final StyleExpressionHandler handler =
          (StyleExpressionHandler) styleExpressionHandlers.get(i);
      final StyleKey key = handler.getKey();
      if (handler.getKey() != null)
      {
        final Expression expression = handler.getExpression();
        band.setStyleExpression(key, expression);
      }
    }
  }
View Full Code Here

      if ("child".equalsIgnoreCase(tagName))
      {
        final String type = atts.getValue(uri, "type");
        if ("org.pentaho.reportdesigner.crm.report.model.BandReportElement".equals(type))
        {
          final AbstractReportElementReadHandler readHandler = new BandElementReadHandler(new Band());
          childElements.add(readHandler);
          return readHandler;
        }
        if ("org.pentaho.reportdesigner.crm.report.model.AnchorFieldReportElement".equals(type))
        {
View Full Code Here

      // a deep traversing event means, we are in a subreport ..

      // force that this last pagebreak ... (This is an indicator for the
      // pagefooter's print-on-last-page) This is highly unclean and may or
      // may not work ..
      final Band b = event.getReport().getReportFooter();
      renderer.startSection(Renderer.TYPE_NORMALFLOW);
      print(getRuntime(), b);
      addSubReportMarkers(renderer.endSection());

      if (event.isDeepTraversing() == false)
View Full Code Here

          }
        }
      }

      // and finally print the watermark of the subreport itself ..
      final Band watermark = report.getWatermark();
      if (isPageHeaderPrinting(watermark, state))
      {
        runtime = createRuntime(state.getFlowController().getMasterRow(), state, processingContext);
        print(runtime, watermark);
      }
      addSubReportMarkers(renderer.endSection());
    }

    if (metaData.isFeatureSupported(OutputProcessorFeature.PAGE_SECTIONS))
    {
      renderer.startSection(Renderer.TYPE_HEADER);
      // after printing the watermark, we are still at the top of the page.

      if (levels == null)
      {
        levels = DefaultOutputFunction.collectSubReportStates(state, processingContext);
      }

      for (int i = levels.length - 1; i >= 0; i -= 1)
      {
        // This is propably wrong (or at least incomplete) in case a subreport uses header or footer which should
        // not be printed with the report-footer or header ..
        final LayouterLevel level = levels[i];
        final ReportDefinition def = level.getReportDefinition();
        final PageHeader header = def.getPageHeader();
        if (header.isSticky())
        {
          if (isPageHeaderPrinting(header, state))
          {
            print(level.getRuntime(), header);
          }
          else
          {
            printEmptyRootLevelBand();
          }
        }
      }

      // and print the ordinary page header ..
      final Band b = report.getPageHeader();
      if (isPageHeaderPrinting(b, state))
      {
        if (runtime == null)
        {
          runtime = createRuntime(state.getFlowController().getMasterRow(), state, processingContext);
View Full Code Here

  private ArrayList elementHandlers;
  private ArrayList styleExpressionHandlers;

  public BandReadHandler()
  {
    this(new Band());
  }
View Full Code Here

    this("band");
  }

  protected Element createElement(final String elementType) throws ParseException
  {
    return new Band();
  }
View Full Code Here

   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();

    final Band band = (Band) getElement();
    for (int i = 0; i < elementHandlers.size(); i++)
    {
      final XmlReadHandler readHandler = (XmlReadHandler) elementHandlers.get(i);
      final Element e = (Element) readHandler.getObject();
      band.addElement(e);
    }

  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.Band

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.