void (Component component, Graphics2D g) { Window window = ComponentUtil.getWindow(component); if (window != null) { if (myComponent != component) { myComponent = component; myShadows = getShadows(component, window); } List<Rectangle> shadows = myShadows; if (shadows != null) { for (Rectangle bounds : shadows) { PAINTER.paintShadow(component, g, bounds.x, bounds.y, bounds.width, bounds.height); } } } }