Examples of BoxDefinition


Examples of org.jfree.layouting.renderer.model.BoxDefinition

      // The receiving element would define the content property as
      // 'content: elements(header)'

      // an ordinary flow?
      final BoxDefinition contentRoot =
          boxDefinitionFactory.createBlockBoxDefinition
              (context, layoutProcess.getOutputMetaData());

      final NormalFlowRenderBox newFlow = new NormalFlowRenderBox(contentRoot);
      newFlow.appyStyle(context, layoutProcess.getOutputMetaData());
View Full Code Here

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

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

   */
  public long getMinimumWidth(final RenderNode node)
  {
    final InlineRenderBox box = (InlineRenderBox) node;
    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final BoxDefinition bdef = box.getBoxDefinition();
    return blp.getBorderRight() + bdef.getPaddingRight() + blp.getMarginRight();
  }
View Full Code Here

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

      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

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

    if (isContentBox == false)
    {
      return unmodified;
    }

    final BoxDefinition sblp = element.getBoxDefinition();
    if (sblp.getPaddingTop() != 0 || sblp.getPaddingBottom() != 0)
    {
      final long coordinate = elementBottomY - sblp.getPaddingBottom();
      if (coordinate > 0)
      {
        ensureYMapping(coordinate, Boolean.FALSE);
        if (shiftedY >= 0)
        {
          ensureYMapping(elementY + sblp.getPaddingTop(), Boolean.FALSE);
        }
      }
    }

    if (sblp.getPaddingLeft() != 0)
    {
      // check if the element is a page-spanning element. No top-paddings apply in that case..
      ensureXMapping(elementX + sblp.getPaddingLeft(), Boolean.FALSE);
    }
    if (sblp.getPaddingRight() != 0)
    {
      ensureXMapping(elementRightX - sblp.getPaddingRight(), Boolean.FALSE);
    }

    return unmodified;
  }
View Full Code Here

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

   */
  public long getMinimumWidth(final RenderNode node)
  {
    final InlineRenderBox box = (InlineRenderBox) node;
    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final BoxDefinition bdef = box.getBoxDefinition();
    return blp.getBorderLeft() + bdef.getPaddingLeft() + blp.getMarginLeft();
  }
View Full Code Here

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

    final long elementRightX = (element.getWidth() + elementX);
    final long elementBottomY = element.getHeight() + shiftedY;

    // collect the bounds and add them to the xBounds and yBounds collection
    // if necessary...
    final BoxDefinition sblp = element.getBoxDefinition();
    ensureXMapping(elementX + sblp.getPaddingLeft(), Boolean.FALSE);
    ensureYMapping(elementY + sblp.getPaddingTop(), Boolean.FALSE);
    ensureXMapping(elementRightX - sblp.getPaddingRight(), Boolean.FALSE);
    ensureYMapping(elementBottomY - sblp.getPaddingBottom(), Boolean.FALSE);
  }
View Full Code Here

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

   * @param box the box that should be processed.
   * @return true if the box is new, false otherwise
   */
  private boolean updateStaticProperties(final RenderBox box)
  {
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();
    if (sblp.getNominalBaselineInfo() != null)
    {
      // mark box as seen ..
      box.setStaticBoxPropertiesAge(box.getChangeTracker());
      return false;
    }

    final long parentWidth = ProcessUtility.computeBlockContextWidth(box);
    sblp.setMarginTop(boxDefinition.getMarginTop().resolve(parentWidth));
    sblp.setMarginLeft(boxDefinition.getMarginLeft().resolve(parentWidth));
    sblp.setMarginBottom(boxDefinition.getMarginBottom().resolve(parentWidth));
    sblp.setMarginRight(boxDefinition.getMarginRight().resolve(parentWidth));

    final Border border = boxDefinition.getBorder();
    sblp.setBorderTop(border.getTop().getWidth());
    sblp.setBorderLeft(border.getLeft().getWidth());
    sblp.setBorderBottom(border.getBottom().getWidth());
    sblp.setBorderRight(border.getRight().getWidth());

View Full Code Here

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

  }

  private long resolveComputedWidth(final RenderBox box)
  {
    final long bcw = ProcessUtility.computeBlockContextWidth(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(bcw, 0);
    final long pref = prefLength.resolve(bcw, 0);
    final long max = maxLength.resolve(bcw, ComputeStaticPropertiesProcessStep.MAX_AUTO);
    return ProcessUtility.computeLength(min, max, pref);
View Full Code Here

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

      {
        box.getStaticBoxLayoutProperties().setBlockContextWidth(0);
      }
      else
      {
        final BoxDefinition boxDefinition = box.getBoxDefinition();
        final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();
        final long insets = sblp.getBorderLeft() + sblp.getBorderRight() +
            boxDefinition.getPaddingLeft() + boxDefinition.getPaddingRight();
        box.getStaticBoxLayoutProperties().setBlockContextWidth(Math.max(0, computedWidth - insets));
      }
    }

    return true;
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.