(Graphics g, int pos, ImageIcon icon, float alpha)
| 457 | */ |
| 458 | //private void drawButton(Graphics g, String symbol, int pos, boolean highlight) { |
| 459 | private void drawButton(Graphics g, int pos, ImageIcon icon, float alpha) { |
| 460 | int left = sizeW - (pos + 1) * buttonEach; |
| 461 | |
| 462 | Graphics2D g2 = (Graphics2D) g.create(); |
| 463 | g2.setComposite(AlphaComposite.SrcAtop.derive(alpha)); |
| 464 | //icon.paintIcon(c, g2, x, y); |
| 465 | icon.paintIcon(this, g2, |
| 466 | left + (buttonEach - icon.getIconWidth()) / 2, |
| 467 | (buttonEach - icon.getIconHeight()) / 2); |
| 468 | g2.dispose(); |
| 469 | } |
| 470 | |
| 471 | |
| 472 | public Dimension getPreferredSize() { |
no test coverage detected