import java.awt.geom.*; static Rect toRect(Rectangle r) { ret r == null ? null : Rect(r); } static Rect toRect(RectangularShape r) { ret r == null ? null : toRect(r.getBounds()); }