1 |
/* Metaltils.java |
/* MetalUtils.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. |
57 |
* @param y the Y coordinate of the upper left corner of the rectangle to |
* @param y the Y coordinate of the upper left corner of the rectangle to |
58 |
* fill |
* fill |
59 |
* @param w the width of the rectangle to fill |
* @param w the width of the rectangle to fill |
60 |
* @param w the height of the rectangle to fill |
* @param h the height of the rectangle to fill |
61 |
* @param light the light color to use |
* @param light the light color to use |
62 |
* @param dark the dark color to use |
* @param dark the dark color to use |
63 |
*/ |
*/ |
68 |
for (int mY = y; mY < (y + h); mY++) |
for (int mY = y; mY < (y + h); mY++) |
69 |
{ |
{ |
70 |
// set color alternating with every line |
// set color alternating with every line |
71 |
if ((mY % 2) == 0) |
if (((mY - y) % 2) == 0) |
72 |
g.setColor(light); |
g.setColor(light); |
73 |
else |
else |
74 |
g.setColor(dark); |
g.setColor(dark); |