Package org.jfree.layouting.renderer.border

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


      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

      return;
    }

    final ComputedLayoutProperties nlp = table.getComputedLayoutProperties();
    final RenderLength blockContextWidth = nlp.getBlockContextWidth();
    final long bcw = blockContextWidth.resolve(0);

    final RenderLength borderSpacingLength = table.getBorderSpacing();
    borderSpacing = borderSpacingLength.resolve(bcw);

    final long totalBorderSpacing = (colCount - 1) * borderSpacing;
 
View Full Code Here

    final ComputedLayoutProperties nlp = table.getComputedLayoutProperties();
    final RenderLength blockContextWidth = nlp.getBlockContextWidth();
    final long bcw = blockContextWidth.resolve(0);

    final RenderLength borderSpacingLength = table.getBorderSpacing();
    borderSpacing = borderSpacingLength.resolve(bcw);

    final long totalBorderSpacing = (colCount - 1) * borderSpacing;
    minimumChunkSize = totalBorderSpacing;
    maxBoxSize = totalBorderSpacing;
    preferredSize = totalBorderSpacing;
View Full Code Here

    // 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

      {
        // A percentage is now relative to the intrinsinc size.
        // And yes, I'm aware that this is not what the standard says ..
        final RenderLength blockContextWidth =
            node.getComputedLayoutProperties().getBlockContextWidth();
        height = node.getRequestedHeight().resolve(blockContextWidth.resolve(0));
      }
    }
    else
    {
      // width is not auto.
View Full Code Here

        if (contentSize.getWidth() > 0)
        {
          final RenderLength blockContextWidth =
              node.getComputedLayoutProperties().getBlockContextWidth();
          final long computedWidth =
              node.getRequestedWidth().resolve(blockContextWidth.resolve(0));
          // Requested height must be computed to preserve the aspect ratio.
          height = computedWidth * contentSize.getHeight()/contentSize.getWidth();
        }
        else
        {
View Full Code Here

      else
      {
        // height is something fixed ..
        final RenderLength blockContextWidth =
            node.getComputedLayoutProperties().getBlockContextWidth();
        height = node.getRequestedHeight().resolve(blockContextWidth.resolve(0));
      }
    }
  }

  public long getBaselineDistance(final int baseline)
View Full Code Here

    }

    final RenderLength baselineShiftResolved = node.getBaselineShiftResolved();
    if (baselineShiftResolved != null)
    {
      return baselineShiftResolved.resolve(lineHeight);
    }

    return 0;
  }
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.