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

Examples of org.pentaho.reporting.engine.classic.core.layout.output.DefaultProcessingContext


  }

  public void testValidate() throws ReportProcessingException, ContentProcessingException
  {
    final MasterReport report = new MasterReport();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);

    final LogicalPageBox pageBox = DebugReportRunner.layoutSingleBand(report, createTable());
    assertTrue(new ValidateModelStep().isLayoutable(pageBox));
    new TableValidationStep().validate(pageBox);
    new ParagraphLineBreakStep().compute(pageBox);
   
    final ComputeStaticPropertiesProcessStep computeStaticPropertiesProcessStep = new ComputeStaticPropertiesProcessStep();
    computeStaticPropertiesProcessStep.initialize(processingContext.getOutputProcessorMetaData(), processingContext);
    computeStaticPropertiesProcessStep.compute(pageBox);

    //ModelPrinter.print(pageBox);
  }
View Full Code Here


    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
    report.getReportFooter().clear();

    ExpressionRuntime runtime = new GenericExpressionRuntime(new DefaultTableModel(), 0, new DefaultProcessingContext(report));

    RichTextStyleResolver.resolveStyle(report);

    XSSFWorkbook hssfWorkbook = new XSSFWorkbook();
    ExcelColorProducer colorProducer = new StaticExcelColorSupport();
View Full Code Here

    FastHtmlImageBounds bounds = new FastHtmlImageBounds(StrictGeomUtility.toInternalValue(20.465),
        StrictGeomUtility.toInternalValue(20.465), StrictGeomUtility.toInternalValue(16),
        StrictGeomUtility.toInternalValue(16));
    recordedBounds.put(element.getElement(1).getObjectID(), bounds);

    ExpressionRuntime runtime = new GenericExpressionRuntime(new DefaultTableModel(), 0, new DefaultProcessingContext(report));
    assertTrue(te.performOutput(element, setup.productImpliedStyles(), recordedBounds, runtime));
    String text = setup.getResult();
    String start = text.substring(0, FAST_HTML_MATCH.length());
    assertEquals(FAST_HTML_MATCH, start);
    assertTrue(text.endsWith("</span>\n"));
View Full Code Here

    final MasterReport report2 = (MasterReport) resource.getResource();
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = (Element) report2.getReportHeader().getElement(0);
    final Object designValue = reportElement.getElementType().getDesignValue(runtime, reportElement);
    final DefaultImageReference image = (DefaultImageReference) designValue;
View Full Code Here

    final MasterReport report2 = (MasterReport) resource.getResource();
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-disk-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-disk-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = (Element) report2.getPageHeader().getElement(4);
    final Object designValue = reportElement.getElementType().getDesignValue(runtime, reportElement);
    final DefaultImageReference image = (DefaultImageReference) designValue;
View Full Code Here

    final MasterReport report2 = (MasterReport) resource.getResource();
    saveReport(report2, new File("bin/test-tmp/prd-3319-load-save-disk-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3319-load-save-disk-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = report2.getReportHeader().getElement(0);
    Object attribute = reportElement.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);
View Full Code Here

  private DataSchema dataSchema;
  private DataFactory dataFactory;

  public GenericExpressionRuntime()
  {
    this (new DefaultTableModel(), 0, new DefaultProcessingContext());
  }
View Full Code Here

  public static int advanceCrosstab(final CrosstabSpecification specification,
                                    final TableModel data,
                                    final String[][] valData)
  {
    // second run. Now with padding ..
    final ProcessingContext prc = new DefaultProcessingContext();
    final GlobalMasterRow gmr = GlobalMasterRow.createReportRow
        (prc, new DefaultDataSchemaDefinition(), new ParameterDataRow());
    gmr.requireStructuralProcessing();
    MasterDataRow wdata = gmr.deriveWithQueryData(data);
    int advanceCount = 1;
View Full Code Here

   */
  protected MasterReport materialize(final MasterReport report,
                                            final ReportPreProcessor processor) throws ReportProcessingException
  {
    final PerformanceMonitorContext pmc = new NoOpPerformanceMonitorContext();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), pmc);
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), false);
    dataFactory.initialize(new ProcessingDataFactoryContext(processingContext, dataFactory));
View Full Code Here

  protected MasterReport materializePreData(MasterReport report, ReportPreProcessor reportPreProcessor)
      throws ReportProcessingException
  {
    final PerformanceMonitorContext pmc = new NoOpPerformanceMonitorContext();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), pmc);
    return reportPreProcessor.performPreDataProcessing(report, flowController);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.output.DefaultProcessingContext

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.