/[schmitzm]/trunk/src/skrueger/geotools/XMapPane.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/XMapPane.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 638 by alfonx, Thu Jan 28 14:35:45 2010 UTC revision 639 by alfonx, Thu Jan 28 16:07:22 2010 UTC
# Line 992  public class XMapPane extends JPanel { Line 992  public class XMapPane extends JPanel {
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;
# Line 1014  public class XMapPane extends JPanel { Line 1023  public class XMapPane extends JPanel {
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    

Legend:
Removed from v.638  
changed lines
  Added in v.639

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26