public void paint(Graphics2D graphics) {
// Determine the paint bounds
Bounds paintBounds = new Bounds(0, 0, getWidth(), getHeight());
Rectangle clipBounds = graphics.getClipBounds();
if (clipBounds != null) {
paintBounds = paintBounds.intersect(new Bounds(clipBounds));
}
for (NodeView nodeView : nodeViews) {
Bounds nodeViewBounds = nodeView.getBounds(false);