Examples of PageSize


Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

    report.getItemBand().addElement(TableTestUtil.createDataItem("detail-field", 100, 20));
    report.getItemBand().getParentSection().getStyle().setStyleProperty(ElementStyleKeys.WIDOWS, 2);


    final MasterReport master = new MasterReport();
    master.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));
    master.getReportHeader().addElement(report);

    DebugReportRunner.createPDF(master);
//    BundleWriter.writeReportToZipFile(master, "/tmp/Prd-2087-Widow-2.prpt");
//    PdfReportUtil.createPDF(master, "/tmp/WidowTest.pdf");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

    model.addRow("a", "1", "row-7");
    model.addRow("b", "1", "row-8");
    model.addRow("b", "2", "row-9");

    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));
    report.addGroup(new RelationalGroup());
    report.setDataFactory(new TableDataFactory("query", model));
    report.setQuery("query");

    final RelationalGroup group0 = (RelationalGroup) report.getGroup(0);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

    report.getItemBand().addElement(createFieldItem("detail-field", 100, 20));
    report.getItemBand().getParentSection().getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, Boolean.TRUE);
    group0.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, Boolean.TRUE);

    final MasterReport master = new MasterReport();
    master.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));
    master.getReportHeader().addElement(report);

//    BundleWriter.writeReportToZipFile(master, "/tmp/Prd-2087-Keep-Together-2.prpt");
//    PdfReportUtil.createPDF(master, "/tmp/KeepTogetherTest5.pdf");
//    DebugReportRunner.createPDF(master);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

    model.addRow("a", "1", "row-7");
    model.addRow("b", "1", "row-8");
    model.addRow("b", "2", "row-9");

    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));
    report.addGroup(new RelationalGroup());
    report.setDataFactory(new TableDataFactory("query", model));
    report.setQuery("query");

    final RelationalGroup group0 = (RelationalGroup) report.getGroup(0);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

  }

  private MasterReport createRelationalReport(final TableModel tableModel, final Class aggFun)
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(800, 300)));
    report.setDataFactory(new TableDataFactory("query", tableModel));
    report.setQuery("query");

    final DesignTimeDataSchemaModel dataSchemaModel = new DesignTimeDataSchemaModel(report);
    final RelationalReportBuilder builder = new RelationalReportBuilder(dataSchemaModel);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.PageSize

  }

  public void testPdfPrinting () throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(PageFormatFactory.create(new PageSize(500, 400),
        PageFormat.PORTRAIT, new Insets(0, 0, 0, 0)), 1, 2));

    final Element topLabel = TableTestUtil.createDataItem("Top Label");
    topLabel.getStyle().setStyleProperty(ElementStyleKeys.POS_Y, 0f);
    final Element bottomLabel = TableTestUtil.createDataItem("Bottom Label");
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.keys.page.PageSize

      String ident = value.getStringValue();
      if (ident.equalsIgnoreCase("auto"))
      {
        return CSSAutoValue.getInstance();
      }
      final PageSize ps = PageSizeFactory.getInstance().getPageSizeByName(ident);
      if (ps == null)
      {
        return null;
      }

      value = value.getNextLexicalUnit();
      int pageOrientation = PageFormat.PORTRAIT;
      if (value != null)
      {
        if (value.getLexicalUnitType() != LexicalUnit.SAC_IDENT)
        {
          return null;
        }

        if (value.getStringValue().equalsIgnoreCase("landscape"))
        {
          pageOrientation = PageFormat.LANDSCAPE;
        }
        else if (value.getStringValue().equalsIgnoreCase("reverse-landscape"))
        {
          pageOrientation = PageFormat.REVERSE_LANDSCAPE;
        }
        else if (value.getStringValue().equalsIgnoreCase("portrait"))
        {
          pageOrientation = PageFormat.PORTRAIT;
        }
        else
        {
          return null;
        }
      }

      if (pageOrientation == PageFormat.LANDSCAPE ||
          pageOrientation == PageFormat.REVERSE_LANDSCAPE)
      {
        return new CSSValuePair(CSSNumericValue.createPtValue(ps.getHeight()),
            CSSNumericValue.createPtValue(ps.getWidth()));
      }
      else
      {
        return new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
            CSSNumericValue.createPtValue(ps.getHeight()));
      }
    }
    else
    {
      final CSSNumericValue horizontalWidth = (CSSNumericValue) parseWidth(value);
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.keys.page.PageSize

   */
  public void resolve(final DocumentContext process,
                      final LayoutElement currentNode,
                      final StyleKey key)
  {
    final PageSize ps = process.getOutputMetaData().getDefaultPageSize();
    final CSSValue page =
        new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
            CSSNumericValue.createPtValue(ps.getHeight()));
    currentNode.getLayoutStyle().setValue(PageStyleKeys.SIZE, page);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.keys.page.PageSize

    else if (value instanceof CSSConstant)
    {
      name = value.toString();
    }

    PageSize ps = null;
    if (name != null)
    {
      ps = PageSizeFactory.getInstance().getPageSizeByName(name);
    }

    if (ps == null)
    {
      ps = process.getOutputMetaData().getDefaultPageSize();
    }
    // if it is stll null, then the output target is not valid.
    // We will crash in that case ..
    final CSSValue page =
        new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
            CSSNumericValue.createPtValue(ps.getHeight()));
    layoutContext.setValue(PageStyleKeys.SIZE, page);
  }
View Full Code Here

Examples of org.rssowl.ui.internal.OwlUI.PageSize

      changed = true;
    }

    /* Page Size */
    iVal = fPageSizeCombo.getSelectionIndex();
    PageSize size = PageSize.values()[iVal];
    if (fPrefSelectedPageSize != size.getPageSize()) {
      scope.putInteger(DefaultPreferences.NEWS_BROWSER_PAGE_SIZE, size.getPageSize());
      changed = true;
    }

    /* Find out if any other display properties changed */
    boolean otherDisplayChanges = false;
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.