(Graphics g)
| 268 | } |
| 269 | |
| 270 | void draw(Graphics g) { |
| 271 | int state = isCurrent() ? SELECTED : UNSELECTED; |
| 272 | g.setColor(tabColor[state]); |
| 273 | |
| 274 | Graphics2D g2 = (Graphics2D) g; |
| 275 | g2.fill(Toolkit.createRoundRect(left, 0, |
| 276 | right, HIGH, |
| 277 | hasLeftNotch() ? CURVE_RADIUS : 0, |
| 278 | hasRightNotch() ? CURVE_RADIUS : 0, |
| 279 | 0, 0)); |
| 280 | |
| 281 | int textLeft = getTextLeft(); |
| 282 | if (notification && state == UNSELECTED) { |
| 283 | g.setColor(textColor[SELECTED]); |
| 284 | } else { |
| 285 | g.setColor(textColor[state]); |
| 286 | } |
| 287 | int baseline = (HIGH + fontAscent) / 2; |
| 288 | g.drawString(name, textLeft, baseline); |
| 289 | } |
| 290 | } |
| 291 | } |
no test coverage detected