Package org.jfree.layouting.renderer.border

Examples of org.jfree.layouting.renderer.border.RenderLength.resolve()


    // If the table's width is fixed, then we have to shrink or expand the
    // columns to fit that additional requirement.
    final RenderLength tableCWidth = table.getComputedLayoutProperties().getComputedWidth();
    if (tableCWidth != RenderLength.AUTO)
    {
      final long tableSize = Math.max(tableCWidth.resolve(0), minimumChunkSize);
      // the space we are able to distribute .. (This can be negative, if we
      // have to remove space to get to the defined table size!)
      // The space that is available for the content from the cells. The
      // border-spacing eats some space as well (already in the pref-size-value)
      final long extraSpace = tableSize - preferredSize;
View Full Code Here


    }

    //ComputedLayoutProperties nlp = new ComputedLayoutProperties()
    final RenderLength bcw = computeBlockContextWidth(box);
//    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final long rbcw = bcw.resolve(0);
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final ComputedLayoutProperties clp = new ComputedLayoutProperties();

    if (box instanceof TableCellRenderBox)
    {
View Full Code Here

              // No go.
              width = -1;
              break;
            }

            width += definedWidth.resolve(rbcw);
          }
          if (width > 0)
          {
            clp.setBlockContextWidth(bcw);
            clp.setComputedWidth(new RenderLength(width, false));
View Full Code Here

      if (marginLeft != RenderLength.AUTO &&
          marginRight != RenderLength.AUTO)
      {
        final long mlValue = marginLeft.resolve(rbcw);
        final long mrValue = marginRight.resolve(rbcw);
        final long pwValue = preferredWidth.resolve(rbcw);

        // Sub-Case 1: The defined values satisfy the constraints defined by
        //             the formula
        if (mlValue + mrValue + pwValue == rbcw)
        {
View Full Code Here

      // its value is computed from the equation.
      if (marginLeft == RenderLength.AUTO &&
          marginRight != RenderLength.AUTO)
      {
        final long mrValue = marginRight.resolve(rbcw);
        final long pwValue = preferredWidth.resolve(rbcw);

        clp.setMarginLeft(rbcw - mrValue - pwValue);
        clp.setMarginRight(mrValue);
        clp.setBlockContextWidth(bcw);
        clp.setComputedWidth(new RenderLength(pwValue, false));
View Full Code Here

      if (marginLeft != RenderLength.AUTO &&
          marginRight == RenderLength.AUTO)
      {
        final long mlValue = marginLeft.resolve(rbcw);
        final long pwValue = preferredWidth.resolve(rbcw);

        clp.setMarginLeft(mlValue);
        clp.setMarginRight(rbcw - mlValue - pwValue);
        clp.setBlockContextWidth(bcw);
        clp.setComputedWidth(new RenderLength(pwValue, false));
View Full Code Here

      return true;
    }

    // If both margin-left and margin-right are 'auto', the equation is
    // solved under the extra constraint that margin-left = margin-right.
    final long pwValue = preferredWidth.resolve(rbcw);

    final long margins = rbcw - pwValue;
    final long mlValue = margins / 2;

    clp.setMarginLeft(mlValue);
View Full Code Here

      return true;
    }

    final RenderLength bcw = computeBlockContextWidth(box);
//    final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
    final long rbcw = bcw.resolve(0);
    final BoxDefinition boxDefinition = box.getBoxDefinition();

    final ComputedLayoutProperties clp = new ComputedLayoutProperties();
    computeBorder(boxDefinition, clp, rbcw);
View Full Code Here

      else if (contentSize.getHeight() > 0)
      {
        final RenderLength blockContextWidth =
            node.getComputedLayoutProperties().getBlockContextWidth();
        final long height =
            node.getRequestedHeight().resolve(blockContextWidth.resolve(0));
        width = height * contentSize.getWidth() / contentSize.getHeight();
      }
      else
      {
        width = 0;
View Full Code Here

    else
    {
      final RenderLength blockContextWidth =
          node.getComputedLayoutProperties().getBlockContextWidth();
      // width is not auto.
      width = node.getRequestedWidth().resolve(blockContextWidth.resolve(0));
    }
  }

  /**
   * The width of the element. This is the minimum width of the element.
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.