Package org.pentaho.reporting.engine.classic.extensions.toc

Examples of org.pentaho.reporting.engine.classic.extensions.toc.IndexElement


  protected Object finishResult(final Object res,
                                final ResourceManager manager,
                                final ResourceData data,
                                final ResourceKey context) throws ResourceCreationException, ResourceLoadingException
  {
    final IndexElement report = (IndexElement) res;
    if (report == null)
    {
      throw new ResourceCreationException("Report has not been parsed.");
    }

    // subreports use the content-base of their master-report for now. This is safe for the old platform reports
    // and for bundle-reports.
    report.setDefinitionSource(data.getKey());
    return report;

  }
View Full Code Here


  {
    final Object maybeReport = getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);
    if (maybeReport instanceof IndexElement == false)
    {
      // replace it ..
      report = new IndexElement();
      getRootHandler().setHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME, report);
    }
    else
    {
      report = (IndexElement) maybeReport;
View Full Code Here

  private boolean parseLayout(final String layout) throws ParseException
  {
    try
    {
      final IndexElement report = (IndexElement) performExternalParsing(layout, IndexElement.class);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
    {
      logger.warn("Unable to parse the parameter for this bundle from file: " + layout);
View Full Code Here

  private boolean parseStyles(final String stylefile) throws ParseException
  {
    try
    {
      final IndexElement report = (IndexElement) performExternalParsing(stylefile, IndexElement.class);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
    {
      logger.warn("Unable to parse the parameter for this bundle from file: " + stylefile);
View Full Code Here

          designerContext.setActiveDocument(rrc);
          return;
        }
      }

      final IndexElement report = (IndexElement) element;
      try
      {
        designerContext.addSubReport(activeReportContext, report);
      }
      catch (ReportDataFactoryException e1)
View Full Code Here

        context.setActiveDocument(rrc);
        return null;
      }
    }

    final IndexElement report = (IndexElement) value;
    try
    {
      context.addSubReport(rootBandRenderComponent.getRenderContext(), report);
    }
    catch (ReportDataFactoryException e1)
View Full Code Here

  protected Element createElement(final ElementMetaData elementMetaData,
                                  final String fieldName,
                                  final ReportDocumentContext context) throws InstantiationException
  {
    final ElementType type = elementMetaData.create();
    final IndexElement visualElement = new IndexElement();
    visualElement.setAutoSort(Boolean.TRUE);
    visualElement.getRelationalGroup(0).getHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getRelationalGroup(0).getFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getDetailsFooter().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getDetailsHeader().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getNoDataBand().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    visualElement.getWatermark().setAttribute(ReportDesignerParserModule.NAMESPACE, ReportDesignerParserModule.HIDE_IN_LAYOUT_GUI_ATTRIBUTE, Boolean.TRUE);
    type.configureDesignTimeDefaults(visualElement, Locale.getDefault());
    final ElementStyleSheet styleSheet = visualElement.getStyle();
    styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, DEFAULT_WIDTH);
    styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, DEFAULT_HEIGHT);
    return visualElement;
  }
View Full Code Here

  {
    final Object maybeReport = getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);
    if (maybeReport instanceof IndexElement == false)
    {
      // replace it ..
      report = new IndexElement();
      getRootHandler().setHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME, report);
    }
    else
    {
      report = (IndexElement) maybeReport;
View Full Code Here

  private boolean parseLayout(final String layout) throws ParseException
  {
    try
    {
      final IndexElement report = (IndexElement) performExternalParsing(layout, IndexElement.class);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
    {
      logger.warn("Unable to parse the parameter for this bundle from file: " + layout);
View Full Code Here

  private boolean parseStyles(final String stylefile) throws ParseException
  {
    try
    {
      final IndexElement report = (IndexElement) performExternalParsing(stylefile, IndexElement.class);
      return report == this.report;
    }
    catch (ResourceLoadingException e)
    {
      logger.warn("Unable to parse the parameter for this bundle from file: " + stylefile);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.toc.IndexElement

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.