(Graphics g)
| 255 | } |
| 256 | |
| 257 | int paint(Graphics g) { |
| 258 | super.paintContent(g); |
| 259 | |
| 260 | g.translate(0, super.getHeight()); |
| 261 | int savedColor = g.getColor(); |
| 262 | if (!hasFocus()) { |
| 263 | g.setGrayScale(127); |
| 264 | } |
| 265 | g.drawRect( |
| 266 | 1, 1, |
| 267 | owner.getWidth() - 3, stringComponent.getHeight() + 4); |
| 268 | if (!hasFocus()) { |
| 269 | g.setColor(savedColor); |
| 270 | } |
| 271 | g.translate(3, 3); |
| 272 | paintContent(g); |
| 273 | g.translate(-3, -3); |
| 274 | g.translate(0, -super.getHeight()); |
| 275 | |
| 276 | return getHeight(); |
| 277 | } |
| 278 | |
| 279 | @Override |
| 280 | void paintContent(Graphics g) { |
nothing calls this directly
no test coverage detected