Revision 541
org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/toolbox/TransparentScrollPane.java | ||
---|---|---|
1 | 1 |
package es.unex.sextante.gui.toolbox; |
2 | 2 |
|
3 |
import java.awt.Color; |
|
4 | 3 |
import java.awt.Component; |
5 | 4 |
import java.awt.Graphics; |
6 |
|
|
7 | 5 |
import javax.swing.ImageIcon; |
8 | 6 |
import javax.swing.JComponent; |
9 | 7 |
import javax.swing.JScrollPane; |
... | ... | |
55 | 53 |
@Override |
56 | 54 |
public void paintComponent(final Graphics g) { |
57 | 55 |
|
58 |
g.setColor(Color.white); |
|
59 |
g.fillRect(0, 0, this.getWidth(), this.getHeight()); |
|
60 | 56 |
|
61 | 57 |
if (image != null) { |
58 |
g.setColor(this.getBackground()); |
|
59 |
g.fillRect(0, 0, this.getWidth(), this.getHeight()); |
|
62 | 60 |
final int h = image.getIconHeight(); |
63 | 61 |
final int w = image.getIconWidth(); |
64 | 62 |
g.drawImage(image.getImage(), getWidth() - w, getHeight() - h, null, null); |
Also available in: Unified diff