Package org.jfree.layouting.renderer.border

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


      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

      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

    final BoxDefinition boxDefinition = box.getBoxDefinition();
    final RenderLength preferredHeight = boxDefinition.getPreferredHeight();
    final ComputedLayoutProperties rowNlp = box.getComputedLayoutProperties();
    final RenderLength rowComputedWidth = rowNlp.getComputedWidth();
    row.clearSizes();
    row.setPreferredSize(preferredHeight.resolve(rowComputedWidth.resolve(0)));

    final int cellCount = rowInfoStructure.getCellCount();
    for (int i = 0; i < cellCount; i++)
    {
      final TableCell cellAt = rowInfoStructure.getCellAt(i);
View Full Code Here

      }

      final RenderLength definedHeight =
          box.getBoxDefinition().getPreferredHeight();
      row.updateDefinedSize(dataCell.getRowSpan(),
          definedHeight.resolve(computedWidth.resolve(0)));
    }

    currentTable.increaseRowNumber();
  }
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

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.