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(clipBounds);
}
for (TextPaneSkinNodeView nodeView : nodeViews) {
paintChild(graphics, paintBounds, nodeView);
}