/** * Convenience property accessor; returns a Border initialized with the * four-sided margin width. Uses the actual value (computed actual value) * for this element. * * @param cbWidth * @param ctx * @return The marginWidth value */ public RectPropertySet getMarginRect(float cbWidth, CssContext ctx) { return getMarginRect(cbWidth, ctx, true); }
/** * Convenience property accessor; returns a Border initialized with the * four-sided margin width. Uses the actual value (computed actual value) * for this element. * * @param cbWidth * @param ctx * @return The marginWidth value */ public RectPropertySet getMarginRect(float cbWidth, CssContext ctx) { return getMarginRect(cbWidth, ctx, true); }
public RectPropertySet getMargin(CssContext cssCtx) { return getStyle().getMarginRect(_outerPageWidth, cssCtx); }
public RectPropertySet getMargin(CssContext cssCtx) { return getStyle().getMarginRect(_outerPageWidth, cssCtx); }
protected RectPropertySet getStyleMargin(CssContext cssContext, boolean useCache) { return getStyle().getMarginRect(getContainingBlockWidth(), cssContext, useCache); }
protected RectPropertySet getStyleMargin(CssContext cssContext) { return getStyle().getMarginRect(getContainingBlockWidth(), cssContext); }
protected RectPropertySet getStyleMargin(CssContext cssContext, boolean useCache) { return getStyle().getMarginRect(getContainingBlockWidth(), cssContext, useCache); }
protected RectPropertySet getStyleMargin(CssContext cssContext) { return getStyle().getMarginRect(getContainingBlockWidth(), cssContext); }
public int getMarginBorderPadding( CssContext cssCtx, int cbWidth, int which) { BorderPropertySet border = getBorder(cssCtx); RectPropertySet margin = getMarginRect(cbWidth, cssCtx); RectPropertySet padding = getPaddingRect(cbWidth, cssCtx); switch (which) { case LEFT: return (int) (margin.left() + border.left() + padding.left()); case RIGHT: return (int) (margin.right() + border.right() + padding.right()); case TOP: return (int) (margin.top() + border.top() + padding.top()); case BOTTOM: return (int) (margin.bottom() + border.bottom() + padding.bottom()); default: throw new IllegalArgumentException(); } }
public int getMarginBorderPadding( CssContext cssCtx, int cbWidth, int which) { BorderPropertySet border = getBorder(cssCtx); RectPropertySet margin = getMarginRect(cbWidth, cssCtx); RectPropertySet padding = getPaddingRect(cbWidth, cssCtx); switch (which) { case LEFT: return (int) (margin.left() + border.left() + padding.left()); case RIGHT: return (int) (margin.right() + border.right() + padding.right()); case TOP: return (int) (margin.top() + border.top() + padding.top()); case BOTTOM: return (int) (margin.bottom() + border.bottom() + padding.bottom()); default: throw new IllegalArgumentException(); } }