public int getColSpan() { int result = (int) asFloat(CSSName.FS_COLSPAN); return result > 0 ? result : 1; }
public int getColSpan() { int result = (int) asFloat(CSSName.FS_COLSPAN); return result > 0 ? result : 1; }
public int getRowSpan() { int result = (int) asFloat(CSSName.FS_ROWSPAN); return result > 0 ? result : 1; }
public int getRowSpan() { int result = (int) asFloat(CSSName.FS_ROWSPAN); return result > 0 ? result : 1; }
public int getZIndex() { return (int) _master.getStyle().asFloat(CSSName.Z_INDEX); }
public int getZIndex() { return (int) _master.getStyle().asFloat(CSSName.Z_INDEX); }
private boolean isVerticalMarginsAdjoin(LayoutContext c) { CalculatedStyle style = getStyle(); BorderPropertySet borderWidth = style.getBorder(c); RectPropertySet padding = getPadding(c); boolean bordersOrPadding = (int) borderWidth.top() != 0 || (int) borderWidth.bottom() != 0 || (int) padding.top() != 0 || (int) padding.bottom() != 0; if (bordersOrPadding) { return false; } ensureChildren(c); if (getChildrenContentType() == CONTENT_INLINE) { return false; } else if (getChildrenContentType() == CONTENT_BLOCK) { for (Iterator i = getChildIterator(); i.hasNext();) { BlockBox child = (BlockBox) i.next(); if (child.isSkipWhenCollapsingMargins() || ! child.isVerticalMarginsAdjoin(c)) { return false; } } } return style.asFloat(CSSName.MIN_HEIGHT) == 0 && (isAutoHeight() || style.asFloat(CSSName.HEIGHT) == 0); }
private boolean isVerticalMarginsAdjoin(LayoutContext c) { CalculatedStyle style = getStyle(); BorderPropertySet borderWidth = style.getBorder(c); RectPropertySet padding = getPadding(c); boolean bordersOrPadding = (int) borderWidth.top() != 0 || (int) borderWidth.bottom() != 0 || (int) padding.top() != 0 || (int) padding.bottom() != 0; if (bordersOrPadding) { return false; } ensureChildren(c); if (getChildrenContentType() == CONTENT_INLINE) { return false; } else if (getChildrenContentType() == CONTENT_BLOCK) { for (Iterator i = getChildIterator(); i.hasNext();) { BlockBox child = (BlockBox) i.next(); if (child.isSkipWhenCollapsingMargins() || ! child.isVerticalMarginsAdjoin(c)) { return false; } } } return style.asFloat(CSSName.MIN_HEIGHT) == 0 && (isAutoHeight() || style.asFloat(CSSName.HEIGHT) == 0); }
public BreakAtLineContext calcBreakAtLineContext(LayoutContext c) { if (! c.isPrint() || ! getStyle().isKeepWithInline()) { return null; } LineBox breakLine = findLastNthLineBox((int)getStyle().asFloat(CSSName.WIDOWS)); if (breakLine != null) { PageBox linePage = c.getRootLayer().getLastPage(c, breakLine); PageBox ourPage = c.getRootLayer().getLastPage(c, this); if (linePage != null && ourPage != null && linePage.getPageNo() + 1 == ourPage.getPageNo()) { BlockBox breakBox = (BlockBox)breakLine.getParent(); return new BreakAtLineContext(breakBox, breakBox.findOffset(breakLine)); } } return null; }
public BreakAtLineContext calcBreakAtLineContext(LayoutContext c) { if (! c.isPrint() || ! getStyle().isKeepWithInline()) { return null; } LineBox breakLine = findLastNthLineBox((int)getStyle().asFloat(CSSName.WIDOWS)); if (breakLine != null) { PageBox linePage = c.getRootLayer().getLastPage(c, breakLine); PageBox ourPage = c.getRootLayer().getLastPage(c, this); if (linePage != null && ourPage != null && linePage.getPageNo() + 1 == ourPage.getPageNo()) { BlockBox breakBox = (BlockBox)breakLine.getParent(); return new BreakAtLineContext(breakBox, breakBox.findOffset(breakLine)); } } return null; }