private void lookForDynamicFunctions(RenderingContext c) { if (getChildCount() > 0) { for (int i = 0; i < getChildCount(); i++) { Box b = (Box)getChild(i); if (b instanceof InlineLayoutBox) { ((InlineLayoutBox)b).lookForDynamicFunctions(c); } } } }
private void lookForDynamicFunctions(RenderingContext c) { if (getChildCount() > 0) { for (int i = 0; i < getChildCount(); i++) { Box b = (Box)getChild(i); if (b instanceof InlineLayoutBox) { ((InlineLayoutBox)b).lookForDynamicFunctions(c); } } } }
public InlineText findTrailingText() { if (getChildCount() == 0) { return null; } for (int offset = getChildCount() - 1; offset >= 0; offset--) { Box child = getChild(offset); if (child instanceof InlineLayoutBox) { InlineText result = ((InlineLayoutBox)child).findTrailingText(); if (result != null && result.isEmpty()) { continue; } return result; } else { return null; } } return null; }
public boolean isContainsOnlyBlockLevelContent() { if (! isContainsBlockLevelContent()) { return false; } for (int i = 0; i < getChildCount(); i++) { Box b = (Box)getChild(i); if (! (b instanceof BlockBox)) { return false; } } return true; }
public InlineText findTrailingText() { if (getChildCount() == 0) { return null; } for (int offset = getChildCount() - 1; offset >= 0; offset--) { Box child = getChild(offset); if (child instanceof InlineLayoutBox) { InlineText result = ((InlineLayoutBox)child).findTrailingText(); if (result != null && result.isEmpty()) { continue; } return result; } else { return null; } } return null; }
public boolean isContainsOnlyBlockLevelContent() { if (! isContainsBlockLevelContent()) { return false; } for (int i = 0; i < getChildCount(); i++) { Box b = (Box)getChild(i); if (! (b instanceof BlockBox)) { return false; } } return true; }
public void addAllChildren(List list, Layer layer) { for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); if (getContainingLayer() == layer) { list.add(child); if (child instanceof InlineLayoutBox) { ((InlineLayoutBox)child).addAllChildren(list, layer); } } } }
public void prunePendingInlineBoxes() { if (getChildCount() > 0) { for (int i = getChildCount() - 1; i >= 0; i--) { Box b = (Box)getChild(i); if (! (b instanceof InlineLayoutBox)) { break; } InlineLayoutBox iB = (InlineLayoutBox)b; iB.prunePending(); if (iB.isPending()) { removeChild(i); } } } }
public void addAllChildren(List list, Layer layer) { for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); if (getContainingLayer() == layer) { list.add(child); if (child instanceof InlineLayoutBox) { ((InlineLayoutBox)child).addAllChildren(list, layer); } } } }
public void prunePendingInlineBoxes() { if (getChildCount() > 0) { for (int i = getChildCount() - 1; i >= 0; i--) { Box b = (Box)getChild(i); if (! (b instanceof InlineLayoutBox)) { break; } InlineLayoutBox iB = (InlineLayoutBox)b; iB.prunePending(); if (iB.isPending()) { removeChild(i); } } } }
public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) { PaintingInfo pI = getPaintingInfo(); if (pI !=null && ! pI.getAggregateBounds().contains(absX, absY)) { return null; } Box result = null; for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); result = child.find(cssCtx, absX, absY, findAnonymous); if (result != null) { return result; } } return null; }
public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) { PaintingInfo pI = getPaintingInfo(); if (pI !=null && ! pI.getAggregateBounds().contains(absX, absY)) { return null; } Box result = null; for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); result = child.find(cssCtx, absX, absY, findAnonymous); if (result != null) { return result; } } return null; }
private static void moveLineContents(LineBox current, int ty) { for (int i = 0; i < current.getChildCount(); i++) { Box child = current.getChild(i); child.setY(child.getY() + ty); if (child instanceof InlineLayoutBox) { moveInlineContents((InlineLayoutBox) child, ty); } } }
private static void moveLineContents(LineBox current, int ty) { for (int i = 0; i < current.getChildCount(); i++) { Box child = (Box) current.getChild(i); child.setY(child.getY() + ty); if (child instanceof InlineLayoutBox) { moveInlineContents((InlineLayoutBox) child, ty); } } }
public boolean isContainsVisibleContent() { for (int i = 0; i < getChildCount(); i++) { Box b = getChild(i); if (b instanceof BlockBox) { if (b.getWidth() > 0 || b.getHeight() > 0) { return true; } } else { boolean maybeResult = ((InlineLayoutBox)b).isContainsVisibleContent(); if (maybeResult) { return true; } } } return false; }
public boolean isContainsVisibleContent() { for (int i = 0; i < getChildCount(); i++) { Box b = getChild(i); if (b instanceof BlockBox) { if (b.getWidth() > 0 || b.getHeight() > 0) { return true; } } else { boolean maybeResult = ((InlineLayoutBox)b).isContainsVisibleContent(); if (maybeResult) { return true; } } } return false; }
private boolean intersectsInlineBlocks(CssContext cssCtx, Shape clip) { for (int i = 0; i < getChildCount(); i++) { Box child = (Box)getChild(i); if (child instanceof InlineLayoutBox) { boolean possibleResult = ((InlineLayoutBox)child).intersectsInlineBlocks( cssCtx, clip); if (possibleResult) { return true; } } else { BoxCollector collector = new BoxCollector(); if (collector.intersectsAny(cssCtx, clip, child)) { return true; } } } return false; }
private boolean intersectsInlineBlocks(CssContext cssCtx, Shape clip) { for (int i = 0; i < getChildCount(); i++) { Box child = (Box)getChild(i); if (child instanceof InlineLayoutBox) { boolean possibleResult = ((InlineLayoutBox)child).intersectsInlineBlocks( cssCtx, clip); if (possibleResult) { return true; } } else { BoxCollector collector = new BoxCollector(); if (collector.intersectsAny(cssCtx, clip, child)) { return true; } } } return false; }
private static void positionVertically( LayoutContext c, Box container, LineBox current, MarkerData markerData) { if (current.getChildCount() == 0 || ! current.isContainsVisibleContent()) { current.setHeight(0); } else { for (int i = 0; i < current.getChildCount(); i++) { Box child = current.getChild(i); positionInlineContentVertically(c, vaContext, child);
private static void positionVertically( LayoutContext c, Box container, LineBox current, MarkerData markerData) { if (current.getChildCount() == 0 || ! current.isContainsVisibleContent()) { current.setHeight(0); } else { for (int i = 0; i < current.getChildCount(); i++) { Box child = current.getChild(i); positionInlineContentVertically(c, vaContext, child);