protected void computeInlineBlock( final RenderBox box, final long position, final long itemElementWidth) { final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties(); box.setCachedX(position + blp.getMarginLeft()); final long width = itemElementWidth - blp.getMarginLeft() - blp.getMarginRight(); if (width == 0) { // ModelPrinter.printParents(box); 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); }
protected boolean startTableCellBox(final TableCellRenderBox box) { if (currentTable == null) { return false; } if (currentTable.getSectionRenderBox() == null) { return false; } final int rowSpan = box.getRowSpan(); final int colSpan = box.getColSpan(); final int startPos = currentTable.increaseCellPosition(colSpan, rowSpan); while (currentTable.columnModel.getColumnCount() <= startPos) { currentTable.columnModel.addAutoColumn(); } box.setColumnIndex(startPos); box.setBodySection(currentTable.isBodySection()); final BoxDefinition boxDefinition = box.getBoxDefinition(); final long preferredHeight = boxDefinition.getPreferredHeight().resolve(0); final long minHeight = boxDefinition.getMinimumHeight().resolve(0); final long maxHeight = boxDefinition.getMaximumHeight().resolve(0, MAX_AUTO); final long preferredSize = ProcessUtility.computeLength(minHeight, maxHeight, preferredHeight); currentTable.updateDefinedSize(rowSpan, preferredSize); return true; }