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

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


          pageHeaderHandler = new BandTopLevelElementReadHandler(new PageHeader(), bandtype);
          return pageHeaderHandler;
        }
        if ("PAGE_FOOTER".equals(bandtype))
        {
          pageFooterHandler = new BandTopLevelElementReadHandler(new PageFooter(), bandtype);
          return pageFooterHandler;
        }
        if ("WATERMARK".equals(bandtype))
        {
          watermarkHandler = new BandTopLevelElementReadHandler(new Watermark(), bandtype);
View Full Code Here


          pageHeaderHandler = new BandTopLevelElementReadHandler(new PageHeader(), bandtype);
          return pageHeaderHandler;
        }
        if ("PAGE_FOOTER".equals(bandtype))
        {
          pageFooterHandler = new BandTopLevelElementReadHandler(new PageFooter(), bandtype);
          return pageFooterHandler;
        }
        if ("WATERMARK".equals(bandtype))
        {
          watermarkHandler = new BandTopLevelElementReadHandler(new Watermark(), bandtype);
View Full Code Here

    }
    report.setReportHeader(header);

    report.setReportFooter(new ReportFooter());
    report.setPageHeader(initPageHeader("Master"));
    report.setPageFooter(new PageFooter());
    report.setDataFactory(tableDataFactory);

    return report;
  }
View Full Code Here

    SubReport report = new SubReport();

    report.setReportHeader(new ReportHeader());
    report.setReportFooter(new ReportFooter());
    report.setPageHeader(initPageHeader("SubReport " + columnsPerPage));
    report.setPageFooter(new PageFooter());

    ItemBand items = report.getItemBand();
    items.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.lightGray);
    items.setName("Items");
View Full Code Here

          printEmptyRootLevelBand();
        }
      }
    }

    final PageFooter pageFooter = report.getPageFooter();
    final ElementStyleSheet pageFooterStyle = pageFooter.getStyle();
    if (state.getCurrentPage() == 1)
    {
      if (pageFooterStyle.getBooleanStyleProperty(BandStyleKeys.DISPLAY_ON_FIRSTPAGE) == true)
      {
        print(getRuntime(), pageFooter);
      }
      else if (somethingSticks)
      {
        printEmptyRootLevelBand();
      }
    }
    else if (isLastPagebreak())
    {
      if (pageFooterStyle.getBooleanStyleProperty(BandStyleKeys.DISPLAY_ON_LASTPAGE, false) == true)
      {
        print(getRuntime(), pageFooter);
      }
      else if (somethingSticks)
      {
        printEmptyRootLevelBand();
      }
    }
    else
    {
      if (somethingSticks)
      {
        printEmptyRootLevelBand();
      }
      else
      {
        print(getRuntime(), pageFooter);
      }
    }
    somethingSticks |= pageFooter.isSticky();

    for (int i = 0; i < levelCount; i++)
    {
      final LayouterLevel level = levels[i];
      final ReportDefinition def = level.getReportDefinition();
      final PageFooter b = def.getPageFooter();
      if (b.isSticky() == false)
      {
        if (somethingSticks)
        {
          printEmptyRootLevelBand();
        }
        continue;
      }

      somethingSticks = true;

      final ElementStyleSheet style = b.getStyle();
      if (state.getCurrentPage() == 1)
      {
        if (style.getBooleanStyleProperty(BandStyleKeys.DISPLAY_ON_FIRSTPAGE) == true)
        {
          print(level.getRuntime(), b);
View Full Code Here

    final PageHeader pageHeader = report.getPageHeader();
    final BundleElementWriteHandler pageHeaderHandler = BundleElementWriterFactory.createHandler(pageHeader);
    pageHeaderHandler.writeElement(bundle, styleFileState, writer, pageHeader);

    // write page-footer
    final PageFooter pageFooter = report.getPageFooter();
    final BundleElementWriteHandler pageFooterHandler = BundleElementWriterFactory.createHandler(pageFooter);
    pageFooterHandler.writeElement(bundle, styleFileState, writer, pageFooter);


    writer.writeCloseTag();
View Full Code Here

    super("page-footer");
  }

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

    // set up the item band...
    final ItemBand itemBand = result.getItemBand();
    configureItemBand(itemBand);

    // set up the page footer...
    final PageFooter pageFooter = result.getPageFooter();
    configurePageFooter(pageFooter);

    return result;

  }
View Full Code Here

    pageHeader.addElement(elementFactory.createElement());
  }

  private void configurePageFooter()
  {
    final PageFooter pageFooter = report.getPageFooter();
    final ElementStyleSheet style = pageFooter.getStyle();
    style.setStyleProperty(BandStyleKeys.DISPLAY_ON_FIRSTPAGE, Boolean.TRUE);
    style.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(24));
    style.setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, new Color(0xAFAFAF));
    pageFooter.addElement
        (HorizontalLineElementFactory.createHorizontalLine
            (0, null, new BasicStroke(1)));

    final TextFieldElementFactory elementFactory = new TextFieldElementFactory();
    elementFactory.setAbsolutePosition(new Point2D.Float(0, 4));
View Full Code Here

   *
   * @return The page footer.
   */
  private PageFooter createPageFooter()
  {
    final PageFooter pageFooter = new PageFooter();
    pageFooter.setName("Page-Footer");
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(30));
    pageFooter.getStyle().setStyleProperty(TextStyleKeys.FONT, "Dialog");
    pageFooter.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_TOP_WIDTH, new Float(1));
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_LEFT_WIDTH, new Float(1));
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_WIDTH, new Float(1));
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_RIGHT_WIDTH, new Float(1));
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE, BorderStyle.SOLID);
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE, BorderStyle.SOLID);
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE, BorderStyle.SOLID);
    pageFooter.getStyle().setStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE, BorderStyle.SOLID);

    final LabelElementFactory factory = new LabelElementFactory();
    factory.setName("Page-Footer-Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(-100, 0));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.TOP);
    factory.setText("Some Text for the page footer");
    factory.setDynamicHeight(Boolean.TRUE);
    pageFooter.addElement(factory.createElement());
    return pageFooter;
  }
View Full Code Here

TOP

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

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.