Package org.pentaho.reporting.engine.classic.core.layout.model.context

Examples of org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition


      parentPosition = 0;
    }
    else
    {
      final StaticBoxLayoutProperties blp = parent.getStaticBoxLayoutProperties();
      final BoxDefinition bdef = parent.getBoxDefinition();
      final long insetsTop = (blp.getBorderTop() + bdef.getPaddingTop());
      parentPosition = parent.getCachedY() + insetsTop;
    }

    final double posY = node.getStyleSheet().getDoubleStyleProperty(ElementStyleKeys.POS_Y, 0);
    if (node.isSizeSpecifiesBorderBox())
    {
      return (parentPosition + RenderLength.resolveLength(resolveParentHeight(node), posY));
    }
    else
    {
      final long insetsTop;
      if ((node.getLayoutNodeType() & LayoutNodeTypes.MASK_BOX) == LayoutNodeTypes.MASK_BOX)
      {
        final RenderBox box = (RenderBox) node;
        final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
        final BoxDefinition bdef = box.getBoxDefinition();
        insetsTop = (blp.getBorderTop() + bdef.getPaddingTop());
      }
      else
      {
        insetsTop = 0;
      }
View Full Code Here


    if (parent == null)
    {
      return node.getCachedHeight();
    }
    final long height = parent.getCachedHeight();
    final BoxDefinition bdef = parent.getBoxDefinition();
    final StaticBoxLayoutProperties blp = parent.getStaticBoxLayoutProperties();
    final long insetsBottom = blp.getBorderBottom() + bdef.getPaddingBottom();
    final long parentAvailableHeight = (parent.getCachedY() + height - insetsBottom) - node.getCachedY();
    if (paranoidChecks && isWatermark(parent) == null)
    {
      // the check is only valid if there is no preferred height
      // a preferred height may create overflowing childs, as it limits the height of the box to the defined value
      if (RenderLength.AUTO.equals(bdef.getPreferredHeight()))
      {
        // the check is only valid if there is no max height
        // a max height may create overflowing childs, as it limits the height of the box to the defined value
        final RenderLength maxHeight = bdef.getMaximumHeight();
        if (RenderLength.AUTO.equals(maxHeight))
        {
          final long childConsumedHeight = parentAvailableHeight - node.getCachedHeight();
          if (childConsumedHeight < 0)
          {
View Full Code Here

  }

  private long computeCanvasHeight(final RenderBox box, final boolean heightResolvesToZero)
  {
    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final BoxDefinition bdef = box.getBoxDefinition();

    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final RenderLength minHeight = boxDefinition.getMinimumHeight();
    final RenderLength preferredHeight = boxDefinition.getPreferredHeight();
    final RenderLength maxHeight = boxDefinition.getMaximumHeight();

    final long insetsTop = (blp.getBorderTop() + bdef.getPaddingTop());
    final long insetsBottom = blp.getBorderBottom() + bdef.getPaddingBottom();
    final long insets = insetsTop + insetsBottom;
View Full Code Here

      // A inline-box always has an other inline-box as parent (the paragraph-pool-box is the only exception;
      // and this one is handled elsewhere).

      // Top and bottom margins are not applied to inline-elements.
      final StaticBoxLayoutProperties blp = parent.getStaticBoxLayoutProperties();
      final BoxDefinition bdef = parent.getBoxDefinition();
      final long insetTop = (blp.getBorderTop() + bdef.getPaddingTop());

      return (insetTop + parent.getCachedY());
    }
    else
    {
View Full Code Here

    {
      return false;
    }

    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();
    final BoxDefinition bdef = box.getBoxDefinition();
    final long boxContentX2 = (box.getX() + box.getWidth() - bdef.getPaddingRight() - sblp.getBorderRight());
    if (boxContentX2 > getContentAreaX2())
    {
      // This is an overflow. Compute the text-ellipse ..
      final RenderBox textEllipseBox = processTextEllipse(box, getContentAreaX2());
      box.setTextEllipseBox(textEllipseBox);
View Full Code Here

    private RenderNodeFactory backend;
    private BoxDefinition watermarkBoxDefinition;

    private WatermarkRenderNodeFactory(final RenderNodeFactory backend)
    {
      final BoxDefinition boxDefinition = new BoxDefinition();
      boxDefinition.setPreferredHeight(RenderLength.createPercentage(100));
      this.watermarkBoxDefinition = boxDefinition.lock();
      this.backend = backend;
    }
View Full Code Here

            (colSpan, rowSpan, null, null, realBackground, cellStyle);
        cellStyleCache = new FastHtmlStyleCache.CellStyle(cellAttributes, cellStyle.toArray());
      }
      else
      {
        BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(content.getComputedStyle());
        final StyleBuilder cellStyle = styleBuilderFactory.createCellStyle(styleBuilder,
            content.getComputedStyle(), boxDefinition, realBackground, null, null);
        final AttributeList cellAttributes = getTagHelper().createCellAttributes
            (colSpan, rowSpan, content.getAttributes(), content.getComputedStyle(), realBackground, cellStyle);
        cellStyleCache = new FastHtmlStyleCache.CellStyle(cellAttributes, cellStyle.toArray());
View Full Code Here

    }

    box.setColumnIndex(startPos);
    box.setBodySection(currentTable.isBodySection());

    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final long preferredHeight = boxDefinition.getPreferredHeight().resolve(0);
    final long minHeight = boxDefinition.getMinimumHeight().resolve(0);
    final long maxHeight = boxDefinition.getMaximumHeight().resolve(0, MAX_AUTO);

    final long preferredSize = ProcessUtility.computeLength(minHeight, maxHeight, preferredHeight);
    currentTable.updateDefinedSize(rowSpan, preferredSize);
    return true;
  }
View Full Code Here

    if (report == null)
    {
      throw new NullPointerException();
    }
    final SimpleStyleSheet reportStyle = bandCache.getStyleSheet(style);
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(reportStyle);
    return new LogicalPageBox(report, reportStyle, boxDefinition);
  }
View Full Code Here

  public RenderBox produceSectionBox(final String layoutType, final ReportStateKey stateKey)
  {
    if (strictCompatibilityMode)
    {
      final BoxDefinition boxDefinition = BoxDefinition.EMPTY;
      return new SectionRenderBox(bandWithoutKeepTogetherStyle, new InstanceID(), boxDefinition, AutoLayoutBoxType.INSTANCE,
          ReportAttributeMap.emptyMap(), stateKey);
    }

    final RenderBox renderBox = createBox(layoutType, stateKey,
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition

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.