(Graphics g)
| 45 | } |
| 46 | |
| 47 | public void draw(Graphics g) { |
| 48 | try { |
| 49 | drawBackground(g); |
| 50 | |
| 51 | boolean needOverlayDrawn = true; |
| 52 | for (FDisplayObject child : children) { |
| 53 | if (child.isVisible()) { |
| 54 | if (child.drawAboveOverlay() && needOverlayDrawn) { |
| 55 | drawOverlay(g); |
| 56 | needOverlayDrawn = false; |
| 57 | } |
| 58 | |
| 59 | final boolean disabled = !child.isEnabled(); |
| 60 | if (disabled) { |
| 61 | g.setAlphaComposite(DISABLED_COMPOSITE); |
| 62 | } |
| 63 | |
| 64 | g.draw(child); |
| 65 | |
| 66 | if (disabled) { |
| 67 | g.resetAlphaComposite(); |
| 68 | } |
| 69 | |
| 70 | child.drawOnContainer(g); //give child an additional chance to draw additional content on container outside its bounds |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | if (needOverlayDrawn) { |
| 75 | drawOverlay(g); |
| 76 | } |
| 77 | } |
| 78 | catch (ConcurrentModificationException ex) { |
| 79 | //ignore concurrent modification exceptions during render |
| 80 | } |
| 81 | catch (Exception ex) { |
| 82 | BugReporter.reportException(ex); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | protected void drawOverlay(Graphics g) { |
| 87 | } |
no test coverage detected