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

Examples of org.pentaho.reporting.engine.classic.core.function.ProcessingContext


    final PageFormatFactory fmFactory = PageFormatFactory.getInstance();
    final PageFormat pageFormat = new PageFormat();
    pageFormat.setPaper(fmFactory.createPaper((double) sequence.getPageWidth(), 1000d));

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

    final TableDebugOutputProcessor outputProcessor = new TableDebugOutputProcessor(metaData);
    final TableDebugRenderer flowRenderer = new TableDebugRenderer(outputProcessor);
    final MasterReport report = new MasterReport();
View Full Code Here


        plot.setBackgroundImage(plotImageCache);
      }
      else
      {
        final ExpressionRuntime expressionRuntime = getRuntime();
        final ProcessingContext context = expressionRuntime.getProcessingContext();
        final ResourceKey contentBase = context.getContentBase();
        final ResourceManager manager = context.getResourceManager();
        try
        {
          final ResourceKey key = createKeyFromString(manager, contentBase, backgroundImage);
          final Resource resource = manager.create(key, null, Image.class);
          final Image image = (Image) resource.getResource();
View Full Code Here

    if (state == null)
    {
      return;
    }

    final ProcessingContext processingContext = getRuntime().getProcessingContext();
    final ReportDefinition report = state.getReport();
    LayouterLevel[] levels = null;
    ExpressionRuntime runtime = null;
    final OutputProcessorMetaData metaData = renderer.getOutputProcessor().getMetaData();
    if (metaData.isFeatureSupported(OutputProcessorFeature.WATERMARK_SECTION))
View Full Code Here

      if (hasOverrideFunction == false)
      {
        definition.addStructureFunction(new WizardOverrideFormattingFunction());
      }

      final ProcessingContext reportContext = flowController.getReportContext();
      this.definition = definition;
      this.flowController = flowController;
      this.attributeContext = new DefaultDataAttributeContext(reportContext.getOutputProcessorMetaData(),
          reportContext.getResourceBundleFactory().getLocale());

      final Object o = definition.getAttribute(AttributeNames.Wizard.NAMESPACE, "enable");
      if (Boolean.TRUE.equals(o) == false)
      {
        return performRefreshPreProcessing();
View Full Code Here

  {
    final Band details = AutoGeneratorUtility.findGeneratedContent(definition.getItemBand());
    final Band header = AutoGeneratorUtility.findGeneratedContent(definition.getDetailsHeader());
    final Band footer = AutoGeneratorUtility.findGeneratedContent(definition.getDetailsFooter());

    final ProcessingContext reportContext = flowController.getReportContext();
    final DefaultDataAttributeContext dac = new DefaultDataAttributeContext
        (reportContext.getOutputProcessorMetaData(), reportContext.getResourceBundleFactory().getLocale());

    final DataRow dataRow = flowController.getMasterRow().getGlobalView();
    final DataSchema dataSchema = flowController.getMasterRow().getDataSchema();

    // final Locale locale = reportContext.getResourceBundleFactory().getLocale();
View Full Code Here

{
  public static void testLineBreak() throws Exception
  {
    ClassicEngineBoot.getInstance().start();

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

    final URL target = LineBreakTest.class.getResource("linebreak-test.xml"); //$NON-NLS-1$
    final ResourceManager rm = new ResourceManager();
    rm.registerDefaults();
View Full Code Here

    {
      throw new IllegalStateException("Expected Size of 4 but got " + specification.size());
    }

    // second run. Now with padding ..
    final ProcessingContext prc = new DefaultProcessingContext();
    final GlobalMasterRow gmr = GlobalMasterRow.createReportRow
        (prc, new DefaultDataSchemaDefinition(), new ParameterDataRow(), null, false);
    final TableModel data = createTableModel();
    MasterDataRow wdata = gmr.deriveWithQueryData(new ReportDataRow(data));
    int advanceCount = 0;
View Full Code Here

  }

  private static CrosstabSpecification buildCS()
  {
    final ProcessingContext prc = new DefaultProcessingContext();
    final GlobalMasterRow gmr = GlobalMasterRow.createReportRow
        (prc, new DefaultDataSchemaDefinition(), new ParameterDataRow(), null, false);
    final TableModel data = createTableModel();
    MasterDataRow wdata = gmr.deriveWithQueryData(new ReportDataRow(data));
    final CrosstabSpecification cs = new SortedMergeCrosstabSpecification
View Full Code Here

        }
        else
        {
          // subreport comes with an own factory, so open the gates ..
          dataFactory = new CachingDataFactory(subreportDf, dataCacheEnabled);
          final ProcessingContext context = parentState.getFlowController().getReportContext();
          dataFactory.initialize(context.getConfiguration(), context.getResourceManager(),
              context.getContentBase(), resourceBundleFactory);
          dataFactory.open();
          dataFactoryManager.store(functionStorageKey, dataFactory);
        }
      }
View Full Code Here

    if (value instanceof ReportDrawable)
    {
      // A report drawable element receives some context information as well.

      final ReportDrawable reportDrawable = (ReportDrawable) value;
      final ProcessingContext processingContext = runtime.getProcessingContext();
      reportDrawable.setConfiguration(processingContext.getConfiguration());
      reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
      processReportDrawableContent(reportDrawable, parentRenderBox, element, stateKey);
    }
    else if (value instanceof Anchor)
    {
      DefaultLayoutBuilder.logger.warn
          ("The use of anchor-objects is deprecated and will be removed from future reports. " +
              "Update your report definition.");
      processAnchor((Anchor) value, parentRenderBox, element, stateKey);
    }
    else
    {
      final DataSource dataSource = element.getElementType();
      final Object rawValue;
      if (dataSource instanceof RawDataSource)
      {
        final RawDataSource rds = (RawDataSource) dataSource;
        rawValue = rds.getRawValue(runtime, element);
      }
      else
      {
        rawValue = null;
      }
      // String is final, so it is safe to do this ...
      if (DefaultLayoutBuilder.STRING_CLASSNAME.equals(value.getClass().getName()))
      {
        processText(value, rawValue, parentRenderBox, element, stateKey);
      }
      else if (value instanceof Shape)
      {
        final Shape shape = (Shape) value;
        final ReportDrawable reportDrawable = new ShapeDrawable
            (shape, element.getStyle().getBooleanStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO));
        final ProcessingContext processingContext = runtime.getProcessingContext();
        reportDrawable.setConfiguration(processingContext.getConfiguration());
        reportDrawable.setResourceBundleFactory(processingContext.getResourceBundleFactory());
        processReportDrawableContent(reportDrawable, parentRenderBox, element, stateKey);
      }
      else if (value instanceof ImageContainer ||
          value instanceof DrawableWrapper)
      {
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.function.ProcessingContext

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.