@param pos A zero-based button index with 0 as the rightmost button
(Graphics g, String symbol, int pos, boolean highlight)
| 413 | * @param pos A zero-based button index with 0 as the rightmost button |
| 414 | */ |
| 415 | private void drawButton(Graphics g, String symbol, int pos, boolean highlight) { |
| 416 | int left = sizeW - (pos + 1) * buttonSize; |
| 417 | // Overlap very long errors |
| 418 | g.drawImage(bgImage[mode], left, 0, buttonSize, sizeH, this); |
| 419 | |
| 420 | if (highlight) { |
| 421 | // disabling since this doesn't match any of our other UI |
| 422 | // g.setColor(whitishTint); |
| 423 | // g.fillRect(left, 0, sizeH, sizeH); |
| 424 | g.setColor(urlColor); |
| 425 | } else { |
| 426 | g.setColor(fgColor[mode]); |
| 427 | } |
| 428 | g.drawString(symbol, |
| 429 | left + (buttonSize - g.getFontMetrics().stringWidth(symbol))/2, |
| 430 | (sizeH + ascent) / 2); |
| 431 | } |
| 432 | |
| 433 | |
| 434 | public Dimension getPreferredSize() { |
no test coverage detected