public void popLayer() { Layer layer = getLayer(); layer.finish(this); _layers.removeLast(); }
public void popLayer() { Layer layer = getLayer(); layer.finish(this); _layers.removeLast(); }
public void floatBox(LayoutContext c, BlockBox floated) { getFloatManager().floatBox(c, c.getLayer(), this, floated); }
public void floatBox(LayoutContext c, BlockBox floated) { getFloatManager().floatBox(c, c.getLayer(), this, floated); }
public void connectChildrenToCurrentLayer(LayoutContext c) { for (int i = 0; i < getChildCount(); i++) { Box box = getChild(i); box.setContainingLayer(c.getLayer()); box.connectChildrenToCurrentLayer(c); } }
public void pushLayer(Box master) { Layer layer = null; if (_rootLayer == null) { layer = new Layer(master); _rootLayer = layer; } else { Layer parent = getLayer(); layer = new Layer(parent, master); parent.addChild(layer); } pushLayer(layer); }
public void pushLayer(Box master) { Layer layer = null; if (_rootLayer == null) { layer = new Layer(master); _rootLayer = layer; } else { Layer parent = getLayer(); layer = new Layer(parent, master); parent.addChild(layer); } pushLayer(layer); }
public void connectChildrenToCurrentLayer(LayoutContext c) { for (int i = 0; i < getChildCount(); i++) { Box box = getChild(i); box.setContainingLayer(c.getLayer()); box.connectChildrenToCurrentLayer(c); } }
public void connectChildrenToCurrentLayer(LayoutContext c) { if (getInlineChildCount() > 0) { for (int i = 0; i < getInlineChildCount(); i++) { Object obj = getInlineChild(i); if (obj instanceof Box) { Box box = (Box)obj; box.setContainingLayer(c.getLayer()); box.connectChildrenToCurrentLayer(c); } } } }
private static void layoutInlineBlockContent( LayoutContext c, BlockBox containingBlock, BlockBox inlineBlock, int initialY) { inlineBlock.setContainingBlock(containingBlock); inlineBlock.setContainingLayer(c.getLayer()); inlineBlock.initStaticPos(c, containingBlock, initialY); inlineBlock.calcCanvasLocation(); inlineBlock.layout(c); }
public void initContainingLayer(LayoutContext c) { if (getLayer() != null) { setContainingLayer(getLayer()); } else if (getContainingLayer() == null) { if (getParent() == null || getParent().getContainingLayer() == null) { throw new RuntimeException("internal error"); } setContainingLayer(getParent().getContainingLayer()); // FIXME Will be glacially slow for large inline relative layers. Could // be much more efficient. We're just looking for block boxes which are // directly wrapped by an inline relative layer (i.e. block boxes sandwiched // between anonymous block boxes) if (c.getLayer().isInline()) { List content = ((InlineLayoutBox)c.getLayer().getMaster()).getElementWithContent(); if (content.contains(this)) { setContainingLayer(c.getLayer()); } } } }
public void initContainingLayer(LayoutContext c) { if (getLayer() != null) { setContainingLayer(getLayer()); } else if (getContainingLayer() == null) { if (getParent() == null || getParent().getContainingLayer() == null) { throw new RuntimeException("internal error"); } setContainingLayer(getParent().getContainingLayer()); // FIXME Will be glacially slow for large inline relative layers. Could // be much more efficient. We're just looking for block boxes which are // directly wrapped by an inline relative layer (i.e. block boxes sandwiched // between anonymous block boxes) if (c.getLayer().isInline()) { List content = ((InlineLayoutBox)c.getLayer().getMaster()).getElementWithContent(); if (content.contains(this)) { setContainingLayer(c.getLayer()); } } } }
private static void layoutInlineBlockContent( LayoutContext c, BlockBox containingBlock, BlockBox inlineBlock, int initialY) { inlineBlock.setContainingBlock(containingBlock); inlineBlock.setContainingLayer(c.getLayer()); inlineBlock.initStaticPos(c, containingBlock, initialY); inlineBlock.calcCanvasLocation(); inlineBlock.layout(c); }
public void connectChildrenToCurrentLayer(LayoutContext c) { if (getInlineChildCount() > 0) { for (int i = 0; i < getInlineChildCount(); i++) { Object obj = getInlineChild(i); if (obj instanceof Box) { Box box = (Box)obj; box.setContainingLayer(c.getLayer()); box.connectChildrenToCurrentLayer(c); } } } }
public static void layoutAbsolute( LayoutContext c, LineBox currentLine, BlockBox box) { MarkerData markerData = c.getCurrentMarkerData(); c.setCurrentMarkerData(null); box.setContainingBlock(c.getLayer().getMaster()); box.setStaticEquivalent(currentLine); // If printing, don't layout until we know where its going if (! c.isPrint()) { box.layout(c); } else { c.pushLayer(box); c.getLayer().setRequiresLayout(true); c.popLayer(); } c.setCurrentMarkerData(markerData); }
public static void layoutAbsolute( LayoutContext c, LineBox currentLine, BlockBox box) { MarkerData markerData = c.getCurrentMarkerData(); c.setCurrentMarkerData(null); if (box.getStyle().isFixed()) { box.setContainingBlock(c.getRootLayer().getMaster().getContainingBlock()); } else { box.setContainingBlock(c.getLayer().getMaster()); } box.setStaticEquivalent(currentLine); // If printing, don't layout until we know where its going if (! c.isPrint()) { box.layout(c); } else { c.pushLayer(box); c.getLayer().setRequiresLayout(true); c.popLayer(); } c.setCurrentMarkerData(markerData); }