Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.registerDefaults()


              parent.getResourceManager(), StyleKeyRegistry.getRegistry());
    }
    else
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();

      cssValues = styleSheetParserUtil.parseStyles
          (null, styleKey.getName(), value, source, resourceManager, StyleKeyRegistry.getRegistry());
    }
View Full Code Here


  public void testCrosstabCellSpan() throws Exception
  {
    final URL url = getClass().getResource("Crosstab-List.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.setCompatibilityLevel(ClassicEngineBoot.computeVersionId(4, 0, 0));

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutPage(report, 0);
View Full Code Here

   */
  public void testSerialize() throws Exception
  {
    final URLResourceLoader resourceLoader = new URLResourceLoader();
    final ResourceManager manager = new ResourceManager();
    manager.registerDefaults();
    ResourceKey key = null;
    Map<ParameterKey, Object> factoryParameters = new HashMap<ParameterKey, Object>();
    String serializedVersion = null;

    // Test with null parameter
View Full Code Here

  public void testSerializeDeserializeRoundtrip() throws Exception
  {
    final URLResourceLoader resourceLoader = new URLResourceLoader();
    final Map<ParameterKey, Object> factoryParams = new HashMap<ParameterKey, Object>();
    final ResourceManager manager = new ResourceManager();
    manager.registerDefaults();

    factoryParams.put(new FactoryParameterKey("this"), "that");
    factoryParams.put(new FactoryParameterKey("null"), null);
    final ResourceKey originalKey = manager.createKey(URL1, factoryParams);
View Full Code Here

    final MasterReport basereport = new MasterReport();
    basereport.setPageDefinition(new SimplePageDefinition(new PageFormat()));

    final URL target = LayoutTest.class.getResource("padding-test.xml");
    final ResourceManager rm = new ResourceManager();
    rm.registerDefaults();
    final Resource directly = rm.createDirectly(target, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand
        (basereport, report.getReportHeader());
View Full Code Here

    // .. save it.
    saveReport(report, new File("bin/test-tmp/prd-3159-load-save-1.prpt"));

    // load it to establish the context in all resource-keys ..
    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final Resource resource = mgr.createDirectly(new File("bin/test-tmp/prd-3159-load-save-1.prpt"), MasterReport.class);

    // save it once, that changes the bundle ...
    final MasterReport report2 = (MasterReport) resource.getResource();
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-2.prpt"));
View Full Code Here

  }

  public void testLoadSaveFromDisk() throws Exception
  {
    ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final Resource orgRes = mgr.createDirectly(Prd3159Test.class.getResource("Prd-3159.prpt"), MasterReport.class);
    // .. save it.
    final MasterReport report = (MasterReport) orgRes.getResource();
    saveReport(report, new File("bin/test-tmp/prd-3159-load-save-disk-1.prpt"));
View Full Code Here

  public void testPageBreakOnLargeCrosstab() throws Exception
  {
    final URL url = getClass().getResource("Prd-3931.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstab = report.getChildElementByType(CrosstabGroupType.INSTANCE);
    crosstab.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Crosstab.DETAIL_MODE, CrosstabDetailMode.first);
View Full Code Here

  public void testPageBreakOnCT2() throws Exception
  {
    final URL url = getClass().getResource("Crashing-crosstab.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final ReportElement crosstabCell = report.getChildElementByType(CrosstabCellType.INSTANCE);
//    crosstabCell.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.CROSSTAB_DETAIL_MODE, CrosstabDetailMode.first);
View Full Code Here

  private ResourceKey createImageKey()
      throws IOException, ResourceKeyCreationException
  {
    final ResourceManager resMgr = new ResourceManager();
    resMgr.registerDefaults();

    final ByteArrayOutputStream bout = new ByteArrayOutputStream();
    ImageIO.write(new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB), "png", bout);

    final String mimeType = "image/png";
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.