protected int getContainingBlockWidth() { return getContainingBlock().getContentWidth(); }
protected int getContainingBlockWidth() { return getContainingBlock().getContentWidth(); }
public int getContentWidth() { return getContainingBlock().getContentWidth(); }
public int getContentWidth() { return getContainingBlock().getContentWidth(); }
public int getWidth() { return getContentWidth() + getLeftMBP() + getRightMBP(); }
public int getWidth() { return getContentWidth() + getLeftMBP() + getRightMBP(); }
protected int getPaddingWidth(CssContext cssCtx) { RectPropertySet padding = getPadding(cssCtx); return (int)padding.left() + getContentWidth() + (int)padding.right(); }
protected int getPaddingWidth(CssContext cssCtx) { RectPropertySet padding = getPadding(cssCtx); return (int)padding.left() + getContentWidth() + (int)padding.right(); }
private void moveAllTheWayOver(BlockBox current, int direction) { if (direction == LEFT) { current.setX(0); } else if (direction == RIGHT) { current.setX(current.getContainingBlock().getContentWidth() - current.getWidth()); } }
private void moveAllTheWayOver(BlockBox current, int direction) { if (direction == LEFT) { current.setX(0); } else if (direction == RIGHT) { current.setX(current.getContainingBlock().getContentWidth() - current.getWidth()); } }
private boolean fitsInContainingBlock(BlockBox current) { return current.getX() >= 0 && (current.getX() + current.getWidth()) <= current.getContainingBlock().getContentWidth(); }
private boolean fitsInContainingBlock(BlockBox current) { return current.getX() >= 0 && (current.getX() + current.getWidth()) <= current.getContainingBlock().getContentWidth(); }
protected int getCSSWidth(CssContext c) { if (! isAnonymous()) { if (! getStyle().isAutoWidth()) { int result = (int) getStyle().getFloatPropertyProportionalWidth( CSSName.WIDTH, getContainingBlock().getContentWidth(), c); return result >= 0 ? result : -1; } } return -1; }
public Rectangle getPaintingClipEdge(CssContext cssCtx) { Box parent = getParent(); Rectangle result = null; if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK) || getJustificationInfo() != null) { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, parent.getAbsX() + parent.getTx() + parent.getContentWidth() - getAbsX(), _paintingHeight); } else { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, getContentWidth(), _paintingHeight); } return result; }
public Rectangle getPaintingClipEdge(CssContext cssCtx) { Box parent = getParent(); Rectangle result = null; if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK) || getJustificationInfo() != null) { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, parent.getAbsX() + parent.getTx() + parent.getContentWidth() - getAbsX(), _paintingHeight); } else { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, getContentWidth(), _paintingHeight); } return result; }
public BoxDimensions getBoxDimensions() { BoxDimensions result = new BoxDimensions(); result.setLeftMBP(getLeftMBP()); result.setRightMBP(getRightMBP()); result.setContentWidth(getContentWidth()); result.setHeight(getHeight()); return result; }
public BoxDimensions getBoxDimensions() { BoxDimensions result = new BoxDimensions(); result.setLeftMBP(getLeftMBP()); result.setRightMBP(getRightMBP()); result.setContentWidth(getContentWidth()); result.setHeight(getHeight()); return result; }
protected int getCSSWidth(CssContext c, boolean shrinkingToFit) { if (! isAnonymous()) { if (! getStyle().isAutoWidth()) { if (shrinkingToFit && ! getStyle().isAbsoluteWidth()) { return -1; } else { int result = (int) getStyle().getFloatPropertyProportionalWidth( CSSName.WIDTH, getContainingBlock().getContentWidth(), c); return result >= 0 ? result : -1; } } } return -1; }
protected int getCSSHeight(CssContext c) { if (getStyle().isAutoHeight()) { return -1; } else { int result = (int)getStyle().getFloatPropertyProportionalWidth( CSSName.HEIGHT, getContainingBlock().getContentWidth(), c); BorderPropertySet border = getBorder(c); result -= (int)border.top() + (int)border.bottom(); RectPropertySet padding = getPadding(c); result -= (int)padding.top() + (int)padding.bottom(); return result >= 0 ? result : -1; } }
protected int getCSSHeight(CssContext c) { if (getStyle().isAutoHeight()) { return -1; } else { int result = (int)getStyle().getFloatPropertyProportionalWidth( CSSName.HEIGHT, getContainingBlock().getContentWidth(), c); BorderPropertySet border = getBorder(c); result -= (int)border.top() + (int)border.bottom(); RectPropertySet padding = getPadding(c); result -= (int)padding.top() + (int)padding.bottom(); return result >= 0 ? result : -1; } }