public void provideSiblingMarginToFloats(final int margin) { for (Styleable styleable : getInlineContent()) { if (!(styleable instanceof BlockBox)) continue; BlockBox bb = (BlockBox) styleable; if (!bb.isFloated()) continue; bb.getFloatedBoxData().setMarginFromSibling(margin); } }
public void paintReplacedElement(RenderingContext c, BlockBox box) { ReplacedElement replaced = box.getReplacedElement(); java.awt.Point location = replaced.getLocation(); if (replaced instanceof ImageReplacedElement) { drawImage(((ImageReplacedElement) replaced).getImage(), location.x, location.y); } else if (replaced instanceof FormControlReplacementElement) { SWTFormControl swtControl = ((FormControlReplacementElement) replaced).getControl(); swtControl.getSWTControl().setVisible(true); } }
public void copyValues(TableColumn src) { super.copyValues(src); span = src.span; colwidth = (src.colwidth == null) ? null : new String(src.colwidth); mincwidth = src.mincwidth; maxcwidth = src.maxcwidth; wrelative = src.wrelative; percent = src.percent; abswidth = src.abswidth; }
public boolean checkCollision(Bullet bullet) { if (bullet.getPos().getY() < 0 || bullet.getPos().getY() > Util.WINDOW_HEIGHT) return true; else if (bullet.getPos().getX() < 0 || bullet.getPos().getX() > Util.WINDOW_WIDTH) return true; for (Tetromino t : bB.getTetroList()) { if (t.isMoving()) for (Square s : t.getSquares()) { if (bullet.getPos().getY() >= s.getY() && bullet.getPos().getY() <= s.getY() + 22) { if (bullet.getPos().getX() >= s.getX() && bullet.getPos().getX() <= s.getX() + 22) { if (!s.destroyed()) { s.destroy(); return true; } } } } } return false; }