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

Examples of org.pentaho.reporting.engine.classic.core.elementfactory.ContentElementFactory


{
  private ContentElementFactory elementFactory;

  public DrawableRefReadHandler()
  {
    this.elementFactory = new ContentElementFactory();
  }
View Full Code Here


  private ContentElementFactory elementFactory;
  private static final String SRC_ATT = "src";

  public ImageRefReadHandler()
  {
    this.elementFactory = new ContentElementFactory();
  }
View Full Code Here

          (Math.abs(x1), Math.abs(y1), Math.abs(x2), Math.abs(y2));
      final Rectangle2D shapeBounds = line.getBounds2D();
      final Shape transformedShape =
          ShapeTransform.translateShape(line, -shapeBounds.getX(), -shapeBounds.getY());
      // and use that shape with the user's bounds to create the element.
      final ContentElementFactory elementFactory = new ContentElementFactory();
      elementFactory.setName(name);
      elementFactory.setColor(c);
      elementFactory.setStroke(stroke);
      elementFactory.setX(new Float(bounds.getX()));
      elementFactory.setY(new Float(bounds.getY()));
      elementFactory.setMinimumWidth(new Float(bounds.getWidth()));
      elementFactory.setMinimumHeight(new Float(bounds.getHeight()));
      elementFactory.setContent(transformedShape);
      elementFactory.setScale(Boolean.TRUE);
      elementFactory.setKeepAspectRatio(Boolean.FALSE);
      elementFactory.setShouldDraw(Boolean.TRUE);
      element = elementFactory.createElement();
    }

  }
View Full Code Here

          (Math.abs(x1), Math.abs(y1), Math.abs(x2), Math.abs(y2));
      final Rectangle2D shapeBounds = line.getBounds2D();
      final Shape transformedShape =
          ShapeTransform.translateShape(line, -shapeBounds.getX(), -shapeBounds.getY());
      // and use that shape with the user's bounds to create the element.
      final ContentElementFactory elementFactory = new ContentElementFactory();
      elementFactory.setName(name);
      elementFactory.setColor(c);
      elementFactory.setStroke(stroke);
      elementFactory.setX(new Float(shapeBounds.getX()));
      elementFactory.setY(new Float(shapeBounds.getY()));
      elementFactory.setMinimumWidth(new Float(shapeBounds.getWidth()));
      elementFactory.setMinimumHeight(new Float(shapeBounds.getHeight()));
      elementFactory.setContent(transformedShape);
      elementFactory.setScale(Boolean.TRUE);
      elementFactory.setKeepAspectRatio(Boolean.FALSE);
      elementFactory.setShouldDraw(Boolean.TRUE);
      element = elementFactory.createElement();
    }
  }
View Full Code Here

    {
      Watermark watermark = report.getWatermark();
      watermark.setName("WaterMark");

      final URL resource = getClass().getResource("earth.png");
      final ContentElementFactory img1 = new ContentElementFactory();
      img1.setContent(resource);
      img1.setMinimumSize(new FloatDimension(500, 500));
      img1.setAbsolutePosition(new Point2D.Float(0, 0));
      img1.setScale(Boolean.TRUE);
      watermark.addElement(img1.createElement());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

    {
      Watermark watermark = report.getWatermark();
      watermark.setName("WaterMark");

      final URL resource = getClass().getResource("earth.png");
      final ContentElementFactory img1 = new ContentElementFactory();
      img1.setContent(resource);
      img1.setMinimumSize(new FloatDimension(500, 500));
      img1.setAbsolutePosition(new Point2D.Float(0, 0));
      img1.setScale(Boolean.TRUE);
      watermark.addElement(img1.createElement());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

          (Math.abs(x1), Math.abs(y1), Math.abs(x2), Math.abs(y2));
      final Rectangle2D shapeBounds = line.getBounds2D();
      final Shape transformedShape =
          ShapeTransform.translateShape(line, -shapeBounds.getX(), -shapeBounds.getY());
      // and use that shape with the user's bounds to create the element.
      final ContentElementFactory elementFactory = new ContentElementFactory();
      elementFactory.setName(name);
      elementFactory.setColor(c);
      elementFactory.setStroke(stroke);
      elementFactory.setX(new Float(shapeBounds.getX()));
      elementFactory.setY(new Float(shapeBounds.getY()));
      elementFactory.setMinimumWidth(new Float(shapeBounds.getWidth()));
      elementFactory.setMinimumHeight(new Float(shapeBounds.getHeight()));
      elementFactory.setContent(transformedShape);
      elementFactory.setScale(Boolean.TRUE);
      elementFactory.setKeepAspectRatio(Boolean.FALSE);
      elementFactory.setShouldDraw(Boolean.TRUE);
      element = elementFactory.createElement();
    }
  }
View Full Code Here

  private ContentElementFactory elementFactory;
  private static final String SRC_ATT = "src";

  public ImageRefReadHandler()
  {
    this.elementFactory = new ContentElementFactory();
  }
View Full Code Here

{
  private ContentElementFactory elementFactory;

  public DrawableRefReadHandler()
  {
    this.elementFactory = new ContentElementFactory();
  }
View Full Code Here

  {
    final MasterReport report = new MasterReport();
    report.setName("Write Report To Zip File With Image");

    // Create the image element
    final ContentElementFactory factory = new ContentElementFactory();
    factory.setName("T1");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(150, 12));
    factory.setHorizontalAlignment(ElementAlignment.MIDDLE);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    final Element element = factory.createElement();
    assertNotNull(element);

    // Get a binary version of an image
    final byte[] image = createPngImage();
    assertTrue(image.length > 0);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.elementfactory.ContentElementFactory

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.