private static void doClip(Rectangle bounds, int shift) {
    bounds.setBounds(bounds.x + shift, bounds.y, Math.max(bounds.width - shift, 0), bounds.height);
  }
private static void doClip(Rectangle bounds, int shift)