private static void positionInlineBlockVertically( LayoutContext c, VerticalAlignContext vaContext, BlockBox inlineBlock) { int baseline = inlineBlock.calcInlineBaseline(c); int ascent = baseline; int descent = inlineBlock.getHeight() - baseline; alignInlineContent(c, inlineBlock, ascent, descent, vaContext); vaContext.updateInlineTop(inlineBlock.getY()); vaContext.updatePaintingTop(inlineBlock.getY()); vaContext.updateInlineBottom(inlineBlock.getY() + inlineBlock.getHeight()); vaContext.updatePaintingBottom(inlineBlock.getY() + inlineBlock.getHeight()); }
private void applyCSSMinMaxHeight(CssContext c) { if (! getStyle().isMaxHeightNone()) { int cssMaxHeight = getCSSMaxHeight(c); if (getHeight() > cssMaxHeight) { setHeight(cssMaxHeight); } } int cssMinHeight = getCSSMinHeight(c); if (cssMinHeight > 0 && getHeight() < cssMinHeight) { setHeight(cssMinHeight); } }
private void applyCSSMinMaxHeight(CssContext c) { if (! getStyle().isMaxHeightNone()) { int cssMaxHeight = getCSSMaxHeight(c); if (getHeight() > cssMaxHeight) { setHeight(cssMaxHeight); } } int cssMinHeight = getCSSMinHeight(c); if (cssMinHeight > 0 && getHeight() < cssMinHeight) { setHeight(cssMinHeight); } }
private static void positionInlineBlockVertically( LayoutContext c, VerticalAlignContext vaContext, BlockBox inlineBlock) { int baseline = inlineBlock.calcInlineBaseline(c); int ascent = baseline; int descent = inlineBlock.getHeight() - baseline; alignInlineContent(c, inlineBlock, ascent, descent, vaContext); vaContext.updateInlineTop(inlineBlock.getY()); vaContext.updatePaintingTop(inlineBlock.getY()); vaContext.updateInlineBottom(inlineBlock.getY() + inlineBlock.getHeight()); vaContext.updatePaintingBottom(inlineBlock.getY() + inlineBlock.getHeight()); }
result.append("(" + getAbsX() + "," + getAbsY() + ")->(" + getWidth() + " x " + getHeight() + ")"); return result.toString();
result.append("(" + getAbsX() + "," + getAbsY() + ")->(" + getWidth() + " x " + getHeight() + ")"); return result.toString();
intrinsicHeight = new Integer(getBox().getHeight() + top + bottom);
public void initStaticPos(LayoutContext c, BlockBox parent, int childOffset) { setX(0); TableBox table = getTable(); setY(parent.getHeight() + table.getStyle().getBorderVSpacing(c)); c.translate(0, getY()-childOffset); }
public void initStaticPos(LayoutContext c, BlockBox parent, int childOffset) { setX(0); TableBox table = getTable(); setY(parent.getHeight() + table.getStyle().getBorderVSpacing(c)); c.translate(0, getY()-childOffset); }
intrinsicHeight = new Integer(getBox().getHeight() + top + bottom);
intrinsicHeight = new Integer(getBox().getHeight());
intrinsicHeight = new Integer(getBox().getHeight());
public int calcInlineBaseline(CssContext c) { if (isReplaced() && getReplacedElement().hasBaseline()) { Rectangle bounds = getContentAreaEdge(getAbsX(), getAbsY(), c); return bounds.y + getReplacedElement().getBaseline() - getAbsY(); } else { LineBox lastLine = findLastLineBox(); if (lastLine == null) { return getHeight(); } else { return lastLine.getAbsY() + lastLine.getBaseline() - getAbsY(); } } }
protected void calcLayoutHeight( LayoutContext c, BorderPropertySet border, RectPropertySet margin, RectPropertySet padding) { setHeight(getHeight() + ((int) margin.top() + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom() + (int) margin.bottom())); setChildrenHeight(getChildrenHeight() + ((int) margin.top() + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom() + (int) margin.bottom())); }
public int calcInlineBaseline(CssContext c) { if (isReplaced() && getReplacedElement().hasBaseline()) { Rectangle bounds = getContentAreaEdge(getAbsX(), getAbsY(), c); return bounds.y + getReplacedElement().getBaseline() - getAbsY(); } else { LineBox lastLine = findLastLineBox(); if (lastLine == null) { return getHeight(); } else { return lastLine.getAbsY() + lastLine.getBaseline() - getAbsY(); } } }
protected void calcLayoutHeight( LayoutContext c, BorderPropertySet border, RectPropertySet margin, RectPropertySet padding) { setHeight(getHeight() + ((int) margin.top() + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom() + (int) margin.bottom())); setChildrenHeight(getChildrenHeight() + ((int) margin.top() + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom() + (int) margin.bottom())); }
} else if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) { setY(boundingBox.height - (int) style.getFloatPropertyProportionalWidth(CSSName.BOTTOM, cbContentHeight, cssCtx) - getHeight());
} else if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) { setY(boundingBox.height - (int) style.getFloatPropertyProportionalWidth(CSSName.BOTTOM, cbContentHeight, cssCtx) - getHeight());