Examples of PageSize


Examples of org.jfree.layouting.input.style.keys.page.PageSize

      double width = 0;
      double height = 0;

      if(size instanceof PageSize)
      {
        final PageSize pageSize = (PageSize)size;
        width = pageSize.getWidth();
        height = pageSize.getHeight();
      }
      else if(RTF_LANDSCAPE.equals(size))
      {
        if (styleKey.equals(RTF_PAGEWIDTH))
        {
          height = twipToInt(floatValue);
        }
        else
        {
          width = twipToInt(floatValue);
        }
      }
      else
      {
        if (styleKey.equals(RTF_PAGEWIDTH))
        {
          width = twipToInt(floatValue);
        }
        else
        {
          height = twipToInt(floatValue);
        }
      }

      attr.addAttribute(PAGE_RULE_TYPE, PageStyleKeys.SIZE.getName(), new PageSize(width, height));
    }
    else if(styleKey.equals(RTF_MARGINLEFT))
    {
      final float floatValue = ((Float) value).floatValue();
      attr.addAttribute(PAGE_RULE_TYPE, BoxStyleKeys.MARGIN_LEFT.getName(), CSSNumericValue.createValue(CSSNumericType.PT, floatValue));
    }
    else if(styleKey.equals(RTF_MARGINRIGHT))
    {
      final float floatValue = ((Float) value).floatValue();
      attr.addAttribute(PAGE_RULE_TYPE, BoxStyleKeys.MARGIN_RIGHT.getName(), CSSNumericValue.createValue(CSSNumericType.PT, floatValue));
    }
    else if(styleKey.equals(RTF_MARGINTOP))
    {
      final float floatValue = ((Float) value).floatValue();
      attr.addAttribute(PAGE_RULE_TYPE, BoxStyleKeys.MARGIN_TOP.getName(), CSSNumericValue.createValue(CSSNumericType.PT, floatValue));
    }
    else if(styleKey.equals(RTF_MARGINBOTTOM))
    {
      final float floatValue = ((Float) value).floatValue();
      attr.addAttribute(PAGE_RULE_TYPE, BoxStyleKeys.MARGIN_BOTTOM.getName(), CSSNumericValue.createValue(CSSNumericType.PT, floatValue));
    }
    else if(styleKey.equals(RTF_LANDSCAPE))
    {
      final Object size = cssAttr.getAttribute(PageStyleKeys.SIZE.getName());
      if(size instanceof PageSize)
      {
        final PageSize pageSize = (PageSize)size;
        attr.addAttribute(PAGE_RULE_TYPE, PageStyleKeys.SIZE.getName(), new PageSize(pageSize.getHeight(), pageSize.getWidth()));
      }
      else
      {
        attr.addAttribute(PAGE_RULE_TYPE, PageStyleKeys.SIZE.getName(), RTF_LANDSCAPE);
      }
View Full Code Here

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

    final SequenceDataFactory sdf = new SequenceDataFactory();
    sdf.addSequence("query", sequence);

    // use HTML export for test
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(800, 300)));
    report.setDataFactory(sdf);
    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

    ClassicEngineBoot.getInstance().getEditableConfig().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.layout.process.EnableCountBoxesStep", "false");
    ClassicEngineBoot.getInstance().getEditableConfig().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.layout.ParanoidChecks", "false");
    MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-4606-0003.prpt");
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    CompoundDataFactory dataFactory = (CompoundDataFactory) report.getDataFactory();
    SequenceDataFactory sequenceDf = (SequenceDataFactory) dataFactory.getReference(0);
    PerformanceTestSequence sequence = (PerformanceTestSequence) sequenceDf.getSequence("Query 1");
    sequence.setParameter("limit", 10);
View Full Code Here

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

  }

  public void testStandardLayout() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.addElement(createBand("ib1"));
View Full Code Here

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


  public void testStandardLayoutPageBreak() throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.addElement(createBand("ib1"));
View Full Code Here

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

   * @throws ContentProcessingException
   */
  public void testKeepTogetherEffect() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, true);
View Full Code Here

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

   * @throws Exception
   */
  public void testKeepTogetherEffectPagebreak() throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, true);
View Full Code Here

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

   * @throws Exception
   */
  public void testKeepTogetherEffectPagebreak2() throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, true);
View Full Code Here

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

   * @throws Exception
   */
  public void testKeepTogetherEffectPagebreak3() throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, true);
View Full Code Here

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

  }

  public void testKeepTogetherEffectPagebreakLarger() throws Exception
  {
    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(new PageSize(500, 100)));

    final Band detailBody = new Band();
    detailBody.setLayout(BandStyleKeys.LAYOUT_BLOCK);
    detailBody.setName("detail-body");
    detailBody.getStyle().setStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE, true);
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.