Rectangle2D r = new Rectangle2D.Double(x, y, w, h); if (! r.intersects(getX(), getY(), getWidth(), getHeight())) return false;  if (contains(x, y) || contains(x, y + h) || contains(x + w, y) || contains(x + w, y + h)) return true;  Line2D l1 = new Line2D.Double(getX(), getY() + (getHeight() / 2), getX() + getWidth(), getY() + (getHeight() / 2)); Line2D l2 = new Line2D.Double(getX() + (getWidth() / 2), getY(), getX() + (getWidth() / 2), getY() + getHeight());  if (l1.intersects(r) || l2.intersects(r)) return true;
  public boolean intersects(double x, double y, double w, double h)  {		// fixme		return false;	}