/**
  * Returns a {@link Rectangle} representing the visual bounds of the given {@link IContentPart}
  * within the coordinate system of the {@link Scene}.
  *
  * @param contentPart The {@link IContentPart} of which the visual bounds are computed.
  * @return A {@link Rectangle} representing the visual bounds of the given {@link IContentPart}
  *     within the coordinate system of the {@link Scene}.
  */
 protected Rectangle getVisualBounds(IContentPart<Node, ? extends Node> contentPart) {
   if (contentPart == null) {
     throw new IllegalArgumentException("contentPart may not be null!");
   }
   return FX2Geometry.toRectangle(
       contentPart.getVisual().localToScene(contentPart.getVisual().getLayoutBounds()));
 }