Examples of RenderableReplacedContent


Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  private StyleBuilder produceImageStyle(final RenderableReplacedContentBox rc)
  {
    styleBuilder.clear(); // cuts down on object creation

    final NumberFormat pointConverter = styleBuilder.getPointConverter();
    final RenderableReplacedContent content = rc.getContent();
    final long contentWidth = content.getContentWidth();
    final long nodeWidth = rc.getWidth();
    final long contentHeight = content.getContentHeight();
    final long nodeHeight = rc.getHeight();

    final StyleSheet styleSheet = rc.getStyleSheet();
    if (styleSheet.getBooleanStyleProperty(ElementStyleKeys.SCALE))
    {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

    // For legacy reasons: A single ReplacedContent in a paragraph means, we may have a old-style border and
    // background definition.
    if (element.getNodeType() == LayoutNodeTypes.TYPE_BOX_CONTENT)
    {
      final RenderableReplacedContentBox contentBox = (RenderableReplacedContentBox) element;
      final RenderableReplacedContent rpc = contentBox.getContent();
      final Object rawContentObject = rpc.getRawObject();
      if (rawContentObject instanceof DrawableWrapper == false)
      {
        return true;
      }
      final DrawableWrapper wrapper = (DrawableWrapper) rawContentObject;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  protected void processRenderableContent(final RenderableReplacedContentBox node)
  {
    try
    {
      final RenderableReplacedContent prc = node.getContent();
      final AttributeList attributeList = new AttributeList();
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "x",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getX())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "y",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getY())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "width",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "height",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getHeight())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "source", String.valueOf(prc.getSource()));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "content-width",
          String.valueOf(StrictGeomUtility.toExternalValue(prc.getContentWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "content-height",
          String.valueOf(StrictGeomUtility.toExternalValue(prc.getContentHeight())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "requested-width",
          convertRenderLength(prc.getRequestedWidth()));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "requested-height",
          convertRenderLength(prc.getRequestedHeight()));

      final Object o = prc.getRawObject();
      if (o != null)
      {
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "raw-object-type",
            o.getClass().getName());
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

    return false;
  }

  protected void processRenderableContent(final RenderableReplacedContentBox box)
  {
    final RenderableReplacedContent rpc = box.getContent();
    this.rawResult = rpc.getRawObject();
    this.rawSource = box;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  protected void processRenderableContent(final RenderableReplacedContentBox node)
  {
    try
    {
      final RenderableReplacedContent prc = node.getContent();
      final AttributeList attributeList = new AttributeList();
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "x",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getX())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "y",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getY())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "width",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "height",
          String.valueOf(StrictGeomUtility.toExternalValue(node.getHeight())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "source", String.valueOf(prc.getSource()));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "content-width",
          String.valueOf(StrictGeomUtility.toExternalValue(prc.getContentWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "content-height",
          String.valueOf(StrictGeomUtility.toExternalValue(prc.getContentHeight())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "requested-width",
          convertRenderLength(prc.getRequestedWidth()));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "requested-height",
          convertRenderLength(prc.getRequestedHeight()));

      final Object o = prc.getRawObject();
      if (o != null)
      {
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "raw-object-type",
            o.getClass().getName());
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  protected void processRenderableContent(final RenderableReplacedContentBox node)
  {
    try
    {
      final RenderableReplacedContent rpc = node.getContent();
      final Object rawObject = rpc.getRawObject();
      if (rawObject instanceof ImageContainer)
      {
        final Image image = imageCache.getImage((ImageContainer) rawObject);
        if (image == null)
        {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  public static long computeWidth(final RenderableReplacedContentBox content)
  {
    final long bcw = ProcessUtility.computeBlockContextWidth(content);
    final long width = computeWidthInternal(content, bcw);
    final RenderableReplacedContent replacedContent = content.getContent();
    return ProcessUtility.computeLength
        (replacedContent.getMinimumWidth().resolve(bcw), replacedContent.getMaximumWidth().resolve(bcw), width);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  }

  public static long computeHeight(final RenderableReplacedContentBox content,
                                   final long bcw, final long computedWidth)
  {
    final RenderableReplacedContent replacedContent = content.getContent();
    final long height = computeHeightInternal(replacedContent, bcw, computedWidth);
    return ProcessUtility.computeLength
        (replacedContent.getMinimumHeight().resolve(bcw), replacedContent.getMaximumHeight().resolve(bcw), height);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

  }

  public static long computeWidthInternal(final RenderableReplacedContentBox contentBox,
                                          final long blockContextWidth)
  {
    final RenderableReplacedContent content = contentBox.getContent();
    final RenderLength requestedWidth = content.getRequestedWidth();
    final RenderLength requestedHeight = content.getRequestedHeight();
    if (RenderLength.AUTO.equals(requestedWidth))
    {
      // if width is auto, and height is auto,
      if (RenderLength.AUTO.equals(requestedHeight))
      {
        // use the intrinsic width ..
        return content.getContentWidth();
      }
      // if height is not auto, but the width is, then compute a width that
      // preserves the aspect ratio. (
      else
      {
        final long contentHeight = content.getContentHeight();
        if (contentHeight > 0)
        {
          final long height = requestedHeight.resolve(blockContextWidth);
          return height * contentBox.getComputedWidth() / contentHeight;
        }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.RenderableReplacedContent

    if (backgroundHint == BACKGROUND_NONE)
    {
      return;
    }

    final RenderableReplacedContent rpc = node.getContent();
    final Object rawContentObject = rpc.getRawObject();
    if (rawContentObject instanceof DrawableWrapper == false)
    {
      return;
    }
    final DrawableWrapper wrapper = (DrawableWrapper) rawContentObject;
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.