Examples of DrawableWrapper


Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

    final RenderableReplacedContentBox xyChart = (RenderableReplacedContentBox) renderNode;
    RenderableReplacedContent xyChartContent = xyChart.getContent();
    assertTrue(xyChartContent.getRawObject() instanceof DrawableWrapper);

    final DrawableWrapper drawable = (DrawableWrapper)xyChartContent.getRawObject();
    assertTrue(drawable.getBackend() instanceof JFreeChartReportDrawable);
    final JFreeChartReportDrawable jFreeChartReportDrawable = (JFreeChartReportDrawable)drawable.getBackend();
    final JFreeChart xyLineChart = jFreeChartReportDrawable.getChart();
    final XYPlot xyLinePlot = xyLineChart.getXYPlot();

    assertTrue(xyLinePlot.getRenderer() instanceof XYLineAndShapeRenderer);
    final XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer)xyLinePlot.getRenderer();
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

    Assert.assertTrue(elementsByElementType.length > 0);

    for (final RenderNode renderNode : elementsByElementType)
    {
      final RenderableReplacedContentBox c = (RenderableReplacedContentBox) renderNode;
      final DrawableWrapper rawObject = (DrawableWrapper) c.getContent().getRawObject();
      final JFreeChartReportDrawable backend = (JFreeChartReportDrawable) rawObject.getBackend();
      final JFreeChart chart = backend.getChart();
      final CategoryPlot p = (CategoryPlot) chart.getPlot();
      final CategoryDataset dataset = p.getDataset();
      Assert.assertNotNull(dataset);
      DebugLog.log(rawObject);
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

  public void testValidObject()
  {
    final D1 drawable = new D1();
    assertTrue(DrawableWrapper.isDrawable(drawable));
    final DrawableWrapper w = new DrawableWrapper(drawable);
    assertEquals(new Dimension(10, 10), w.getPreferredSize());
    assertEquals(true, w.isPreserveAspectRatio());
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

  public void testInvalidObject()
  {
    final D2 drawable = new D2();
    assertTrue(DrawableWrapper.isDrawable(drawable));
    final DrawableWrapper w = new DrawableWrapper(drawable);
    assertNull(w.getPreferredSize());
    assertEquals(true, w.isPreserveAspectRatio());
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

          (new NonDynamicHeightWrapperStyleSheet(element.getStyle()));
    }


    reportDrawable.setStyleSheet(elementStyle);
    final DrawableWrapper wrapper = new DrawableWrapper(reportDrawable);

    final RenderableReplacedContent content = new RenderableReplacedContent(elementStyle, wrapper, null, getMetaData());
    final BoxDefinition boxDefinition = getBoxDefinitionFactory().getBoxDefinition(elementStyle);
    final RenderableReplacedContentBox child =
        new RenderableReplacedContentBox(elementStyle, element.getObjectID(), boxDefinition,
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

    {
      setDrawable((DrawableWrapper)o);
    }
    else
    {
      setDrawable(new DrawableWrapper(o));
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper

    {
      final double x = (int) StrictGeomUtility.toExternalValue(content.getX());
      final double y = (int) StrictGeomUtility.toExternalValue(content.getY());
      final double width = (int) StrictGeomUtility.toExternalValue(content.getWidth());
      final double height = (int) StrictGeomUtility.toExternalValue(content.getHeight());
      final DrawableWrapper d = (DrawableWrapper) o;
      final Graphics2D g2Clone = (Graphics2D) g2.create();
      d.draw(g2Clone, new Rectangle2D.Double(x,y,width, height));
      g2Clone.dispose();
    }
  }
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.