1 |
/* MetalComboBoxButton.java |
/* MetalComboBoxIcon.java |
2 |
Copyright (C) 2005 Free Software Foundation, Inc. |
Copyright (C) 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
88 |
*/ |
*/ |
89 |
public void paintIcon(Component c, Graphics g, int x, int y) |
public void paintIcon(Component c, Graphics g, int x, int y) |
90 |
{ |
{ |
|
// TODO: work out whether/how the icon changes with different component |
|
|
// states (and also different metal themes) |
|
91 |
Color savedColor = g.getColor(); |
Color savedColor = g.getColor(); |
92 |
g.setColor(Color.black); |
if (c.isEnabled()) |
93 |
|
g.setColor(MetalLookAndFeel.getBlack()); |
94 |
|
else |
95 |
|
g.setColor(MetalLookAndFeel.getControlDisabled()); |
96 |
for (int i = 0; i < 5; i++) |
for (int i = 0; i < 5; i++) |
97 |
g.drawLine(x + i, y + i, x + 9 - i, y + i); |
g.drawLine(x + i, y + i, x + 9 - i, y + i); |
98 |
g.setColor(savedColor); |
g.setColor(savedColor); |