public void addFloat(BlockBox floater, BlockFormattingContext bfc) { if (_floats == null) { _floats = new ArrayList(); } _floats.add(floater); floater.getFloatedBoxData().setDrawingLayer(this); }
public void addFloat(BlockBox floater, BlockFormattingContext bfc) { if (_floats == null) { _floats = new ArrayList(); } _floats.add(floater); floater.getFloatedBoxData().setDrawingLayer(this); }
private void removeFloat(BlockBox floater, List floats) { for (Iterator i = floats.iterator(); i.hasNext();) { BoxOffset boxOffset = (BoxOffset) i.next(); if (boxOffset.getBox().equals(floater)) { i.remove(); floater.getFloatedBoxData().setManager(null); } } }
private void removeFloat(BlockBox floater, List floats) { for (Iterator i = floats.iterator(); i.hasNext();) { BoxOffset boxOffset = (BoxOffset) i.next(); if (boxOffset.getBox().equals(floater)) { i.remove(); floater.getFloatedBoxData().setManager(null); } } }
public void provideSiblingMarginToFloats(int margin) { for (Iterator i = getInlineContent().iterator(); i.hasNext(); ) { Styleable styleable = (Styleable)i.next(); if (styleable instanceof BlockBox) { BlockBox b = (BlockBox)styleable; if (b.isFloated()) { b.getFloatedBoxData().setMarginFromSibling(margin); } } } }
public void provideSiblingMarginToFloats(int margin) { for (Iterator i = getInlineContent().iterator(); i.hasNext(); ) { Styleable styleable = (Styleable)i.next(); if (styleable instanceof BlockBox) { BlockBox b = (BlockBox)styleable; if (b.isFloated()) { b.getFloatedBoxData().setMarginFromSibling(margin); } } } }
private void save(BlockBox current, Layer layer, BlockFormattingContext bfc, int direction) { Point p = bfc.getOffset(); getFloats(direction).add(new BoxOffset(current, p.x, p.y)); layer.addFloat(current, bfc); current.getFloatedBoxData().setManager(this); current.calcCanvasLocation(); current.calcChildLocations(); }
private void save(BlockBox current, Layer layer, BlockFormattingContext bfc, int direction) { Point p = bfc.getOffset(); getFloats(direction).add(new BoxOffset(current, p.x, p.y)); layer.addFloat(current, bfc); current.getFloatedBoxData().setManager(this); current.calcCanvasLocation(); current.calcChildLocations(); }
block.setY(currentLine.getY() + block.getFloatedBoxData().getMarginFromSibling()); } else { block.setY(currentLine.getY() + currentLine.getHeight());
block.setY(currentLine.getY() + block.getFloatedBoxData().getMarginFromSibling()); } else { block.setY(currentLine.getY() + currentLine.getHeight());