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

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


  }

  public boolean isPreserveWhitespace(final RenderNode node)
  {
    final RenderBox box = (RenderBox) node;
    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    return blp.isPreserveSpace();
  }
View Full Code Here


   * @return true if the box is new, false otherwise
   */
  private void updateStaticProperties(final RenderBox box)
  {
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();
    if (sblp.isBaselineCalculated())
    {
      // mark box as seen ..
      return;
    }

View Full Code Here

    if (widowsEnabled == false)
    {
      return;
    }

    final StaticBoxLayoutProperties sblp = parent.getStaticBoxLayoutProperties();
    if (sblp.getOrphans() > 0 || sblp.getWidows() > 0 || sblp.isAvoidPagebreakInside())
    {
      widowOrphanDefinitionsEncountered = true;
      box.setParentWidowContexts(parent.getParentWidowContexts() + 1);
    }
    else
View Full Code Here

  protected void computeInlineBlock(final RenderBox box,
                                    final long position,
                                    final long itemElementWidth)
  {
    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    box.setCachedX(position + blp.getMarginLeft());
    final long width = itemElementWidth - blp.getMarginLeft() - blp.getMarginRight();
    if (width == 0)
    {
      //ModelPrinter.printParents(box);

      throw new IllegalStateException("A box without any width? " +
          Integer.toHexString(System.identityHashCode(box)) + ' ' + box.getClass());
    }
    box.setCachedWidth(width);

    final BoxDefinition bdef = box.getBoxDefinition();
    final long leftInsets = bdef.getPaddingLeft() + blp.getBorderLeft();
    final long rightInsets = bdef.getPaddingRight() + blp.getBorderRight();
    box.setContentAreaX1(box.getCachedX() + leftInsets);
    box.setContentAreaX2(box.getCachedX() + box.getCachedWidth() - rightInsets);

//    final InfiniteMinorAxisLayoutStep layoutStep = new InfiniteMinorAxisLayoutStep(metaData);
//    layoutStep.continueComputation(getPageGrid(), box);
View Full Code Here

  {
    super(box);

    simpleContext = true;

    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    ExtendedBaselineInfo baselineInfo = box.getBaselineInfo();
    if (baselineInfo == null)
    {
      baselineInfo = blp.getNominalBaselineInfo();
    }
    if (baselineInfo == null)
    {
      throw new IllegalStateException("A box that has no baseline info.");
    }
    final int dominantBaselineValue = blp.getDominantBaseline();
    if (dominantBaselineValue == -1)
    {
      setDominantBaseline(baselineInfo.getDominantBaseline());
    }
    else
    {
      setDominantBaseline(dominantBaselineValue);
    }

    final BoxDefinition bdef = box.getBoxDefinition();
    insetsTop = blp.getBorderTop() + bdef.getPaddingTop();
    insetsBottom = blp.getBorderBottom() + bdef.getPaddingBottom();

    baselines = baselineInfo.getBaselines();
    final int length = baselines.length;
    for (int i = 1; i < length; i++)
    {
View Full Code Here

                                                  final BasePaginationTableState tableState)
  {
    // must return the reserved space starting from box's y position.
    final long widowSize = getWidowConstraint(box, shiftState, tableState);

    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();
    if (sblp.isAvoidPagebreakInside() &&
        box.getRestrictFinishedClearOut() != RenderBox.RestrictFinishClearOut.RESTRICTED)
    {
      return Math.max(widowSize, box.getHeight());
    }
View Full Code Here

          return (marginTop + prev.getCachedY());
        }
      }
      else
      {
        final StaticBoxLayoutProperties blp = parent.getStaticBoxLayoutProperties();
        final BoxDefinition bdef = parent.getBoxDefinition();
        final long insetTop = (blp.getBorderTop() + bdef.getPaddingTop());

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

    //final long blockContextWidth = box.getStaticBoxLayoutProperties().getBlockContextWidth();
    final long rminH = minimumHeight.resolve(resolveSize, 0);
    final long rmaxH = maximumHeight.resolve(resolveSize, InfiniteMajorAxisLayoutStep.MAX_AUTO);

    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final long insetBottom = blp.getBorderBottom() + boxDefinition.getPaddingBottom();
    final long insetTop = blp.getBorderTop() + boxDefinition.getPaddingTop();

    // computed height is always the height of the content-box, excluding any paddings and borders
    final long computedContentHeight;
    if (boxDefinition.isSizeSpecifiesBorderBox())
    {
View Full Code Here

    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final RenderLength preferredHeight = boxDefinition.getPreferredHeight();
    final RenderLength minimumHeight = boxDefinition.getMinimumHeight();
    final RenderLength maximumHeight = boxDefinition.getMaximumHeight();

    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final long insetBottom = blp.getBorderBottom() + boxDefinition.getPaddingBottom();
    final long insetTop = blp.getBorderTop() + boxDefinition.getPaddingTop();

    // usedHeight already contains the insetsTop ..
    final long usedHeight;
    RenderNode child = box.getFirstChild();
    if (child != null)
View Full Code Here

    // This aligns all direct childs. Once that is finished, we have to
    // check, whether possibly existing inner-paragraphs are still valid
    // or whether moving them violated any of the inner-pagebreak constraints.

    final StaticBoxLayoutProperties blp = inlineRenderBox.getStaticBoxLayoutProperties();
    final BoxDefinition bdef = inlineRenderBox.getBoxDefinition();
    final long insetTop = (blp.getBorderTop() + bdef.getPaddingTop());

    final long contentAreaY1 = inlineRenderBox.getCachedY() + insetTop;
    final long lineHeight = inlineRenderBox.getLineHeight();
    processor.align(boxAlignContext, contentAreaY1, lineHeight);
  }
View Full Code Here

TOP

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

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.