protected void updateBounds () { ctrl.setBounds((int)_bounds.x(), (int)_bounds.y(), (int)_bounds.width(), (int)_bounds.height()); }
/** Moves ths given inner rectangle such that it lies within the given outer rectangle. * The results are undefined if either the inner width or height is greater that the outer's * width or height, respectively. */ protected static Rectangle confine (IRectangle outer, Rectangle inner) { float dx = outer.x() - inner.x(), dy = outer.y() - inner.y(); if (dx <= 0) dx = Math.min(0, outer.maxX() - inner.maxX()); if (dy <= 0) dy = Math.min(0, outer.maxY() - inner.maxY()); inner.translate(dx, dy); return inner; }
log.warning("Oh god, menu doesn't fit", "menu", pop.menu); bounds.setLocation(ibounds.x() - fudge, ibounds.y() - fudge);