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

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


    if (lastChildNode == null)
    {
      return;
    }

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

    final long childY2 = lastChildNode.getCachedY() + lastChildNode.getCachedHeight() +
        lastChildNode.getEffectiveMarginBottom();
    final long childY1 = box.getFirstChild().getCachedY();
    final long usedHeight = (childY2 - childY1);
View Full Code Here


      proc.deinitialize();

      // Now Perform the vertical layout for the last line of the paragraph.
      final BoxAlignContext valignContext = createVerticalAlignContext(mergedLine);
      final StaticBoxLayoutProperties blp = mergedLine.getStaticBoxLayoutProperties();
      final BoxDefinition bdef = mergedLine.getBoxDefinition();
      final long insetTop = (blp.getBorderTop() + bdef.getPaddingTop());

      final long contentAreaY1 = mergedLine.getCachedY() + insetTop;
      final long lineHeight = mergedLine.getLineHeight();
      verticalAlignmentProcessor.align(valignContext, contentAreaY1, lineHeight);
View Full Code Here

   */
  private static long resolveNodeWidthOnStartInternal(final RenderBox box,
                                                      final MinorAxisNodeContext nodeContext)
  {
    final long minChunkWidth = 0;
    final BoxDefinition boxDef = box.getBoxDefinition();
    final RenderLength minLength = boxDef.getMinimumWidth();
    final RenderLength prefLength = boxDef.getPreferredWidth();
    final RenderLength maxLength = boxDef.getMaximumWidth();

    final long bcw = nodeContext.getBlockContextWidth();
    final long min = minLength.resolve(bcw, 0);
    final long max = maxLength.resolve(bcw, ComputeStaticPropertiesProcessStep.MAX_AUTO);
    if (box.getBoxDefinition().isSizeSpecifiesBorderBox())
View Full Code Here

   */
  private static long resolveNodeWidthOnStartForCanvasLegacyInternal(final RenderBox box,
                                                                     final MinorAxisNodeContext nodeContext)
  {
    final long minChunkWidth = 0;
    final BoxDefinition boxDef = box.getBoxDefinition();
    final RenderLength definedMinLength = boxDef.getMinimumWidth();

    final RenderLength minLength;
    if (definedMinLength.getValue() == 0)
    {
      // PRD-3857 - Auto-correcting min-size to 100% for zero-defined boxes that are not canvas
      // blows up the min-chunk-width test
      minLength = FULL_WIDTH_LENGTH;
    }
    else
    {
      minLength = definedMinLength;
    }

    final RenderLength prefLength = boxDef.getPreferredWidth();
    final RenderLength maxLength = boxDef.getMaximumWidth();

    final long bcw = nodeContext.getBlockContextWidth();
    final long min = minLength.resolve(bcw, 0);
    final long max = maxLength.resolve(bcw, ComputeStaticPropertiesProcessStep.MAX_AUTO);
    if (box.getBoxDefinition().isSizeSpecifiesBorderBox())
View Full Code Here

   */
  private static long resolveNodeWidthOnFinishInternal(final RenderBox box,
                                                       final MinorAxisNodeContext nodeContext,
                                                       final boolean strictLegacyMode)
  {
    final BoxDefinition boxDef = box.getBoxDefinition();
    if (RenderLength.AUTO.equals(boxDef.getPreferredWidth()) == false)
    {
      return nodeContext.getWidth();
    }

    final long minChunkWidth;
    final RenderLength minLength;
    if (strictLegacyMode == false || box.useMinimumChunkWidth())
    {
      minChunkWidth = nodeContext.getMaxChildX2() - nodeContext.getX1();
      minLength = boxDef.getMinimumWidth();
    }
    else
    {
      minChunkWidth = nodeContext.getX2() - nodeContext.getX1();
      if (boxDef.getMinimumWidth().getValue() == 0)
      {
        minLength = FULL_WIDTH_LENGTH;
      }
      else
      {
        minLength = boxDef.getMinimumWidth();
      }
    }

    final RenderLength maxLength = boxDef.getMaximumWidth();

    final long bcw = nodeContext.getBlockContextWidth();
    final long min = minLength.resolve(bcw, 0);
    final long max = maxLength.resolve(bcw, ComputeStaticPropertiesProcessStep.MAX_AUTO);
    if (box.getBoxDefinition().isSizeSpecifiesBorderBox())
View Full Code Here

   * @param box
   * @return
   */
  public static long resolveNodeWidthForMinChunkCalculation(final RenderBox box)
  {
    final BoxDefinition boxDef = box.getBoxDefinition();
    final RenderLength minLength = boxDef.getMinimumWidth();
    final RenderLength prefLength = boxDef.getPreferredWidth();
    final RenderLength maxLength = boxDef.getMaximumWidth();

    final long min = minLength.resolve(0, 0);
    final long max = maxLength.resolve(0, ComputeStaticPropertiesProcessStep.MAX_AUTO);
    if (box.getBoxDefinition().isSizeSpecifiesBorderBox())
    {
View Full Code Here

   * @param box the box that should be processed.
   * @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

      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

    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

    computeLegacyBackground(box);
  }

  private void computeLegacyBackground(final RenderableReplacedContentBox node)
  {
    final BoxDefinition sblp = node.getBoxDefinition();
    final long nodeX = node.getX() + sblp.getPaddingLeft();
    final long nodeY = node.getY() + sblp.getPaddingTop();
    final long nodeWidth = node.getWidth() - sblp.getPaddingLeft() - sblp.getPaddingRight();
    final long nodeHeight = node.getHeight() - sblp.getPaddingTop() - sblp.getPaddingBottom();
    final int backgroundHint = computeBackground(nodeX, nodeY, nodeWidth, nodeHeight);
    if (backgroundHint == BACKGROUND_NONE)
    {
      return;
    }
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.