992 |
|
|
993 |
removeAll(); |
removeAll(); |
994 |
} |
} |
995 |
|
|
996 |
/** |
/** |
997 |
* Draws a rectangle in XOR mode from the origin at {@link #startPos} to the |
* Draws a rectangle in XOR mode from the origin at {@link #startPos} to the |
998 |
* given point. All in screen coordinates. |
* given point. All in screen coordinates. |
999 |
*/ |
*/ |
1000 |
protected void drawRectangle(final Graphics graphics, final Point startPos, |
protected void drawRectangle(final Graphics graphics, final Point startPos, |
1001 |
final Point e) { |
final Point e) { |
1002 |
|
drawRectangle(graphics, startPos, e, Color.WHITE); |
1003 |
|
} |
1004 |
|
|
1005 |
|
/** |
1006 |
|
* Draws a rectangle in XOR mode from the origin at {@link #startPos} to the |
1007 |
|
* given point. All in screen coordinates. |
1008 |
|
*/ |
1009 |
|
protected void drawRectangle(final Graphics graphics, final Point startPos, |
1010 |
|
final Point e, Color color) { |
1011 |
|
|
1012 |
if (!isWellDefined()) |
if (!isWellDefined()) |
1013 |
return; |
return; |
1023 |
if (width == 0 && height == 0) |
if (width == 0 && height == 0) |
1024 |
return; |
return; |
1025 |
|
|
1026 |
graphics.setXORMode(Color.WHITE); |
graphics.setXORMode(color); |
1027 |
graphics.drawRect(left, bottom, width, height); |
graphics.drawRect(left, bottom, width, height); |
1028 |
} |
} |
1029 |
|
|