(Graphics g, Component cmp, int x, int y, int width, int height)
| 1443 | |
| 1444 | /// Renders the current component on the screen |
| 1445 | private void renderComponent(Graphics g, Component cmp, int x, int y, int width, int height) { |
| 1446 | Style s = cmp.getStyle(); |
| 1447 | int left = s.getMarginLeft(isRTL()); |
| 1448 | int top = s.getMarginTop(); |
| 1449 | cmp.setWidth(width - left - s.getMarginRight(isRTL())); |
| 1450 | cmp.setHeight(height - top - s.getMarginBottom()); |
| 1451 | cmp.setX(x + left); |
| 1452 | cmp.setY(y + top); |
| 1453 | |
| 1454 | int oX = g.getClipX(); |
| 1455 | int oY = g.getClipY(); |
| 1456 | int oWidth = g.getClipWidth(); |
| 1457 | int oHeight = g.getClipHeight(); |
| 1458 | //g.pushClip(); |
| 1459 | g.clipRect(cmp.getX(), cmp.getY(), cmp.getWidth(), cmp.getHeight()); |
| 1460 | if (cmp instanceof Container) { |
| 1461 | ((Container) cmp).layoutContainer(); |
| 1462 | } |
| 1463 | cmp.paint(g); |
| 1464 | Border b = s.getBorder(); |
| 1465 | if (b != null && !b.isBackgroundPainter()) { |
| 1466 | cmp.paintBorder(g); |
| 1467 | } |
| 1468 | g.setClip(oX, oY, oWidth, oHeight); |
| 1469 | //g.popClip(); |
| 1470 | } |
| 1471 | |
| 1472 | private void renderComponentBackground(Graphics g, Component cmp, int x, int y, int width, int height) { |
| 1473 | Style s = cmp.getStyle(); |
no test coverage detected