/[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 653 by alfonx, Mon Feb 1 15:09:18 2010 UTC revision 654 by alfonx, Mon Feb 1 18:13:14 2010 UTC
# Line 1014  public class XMapPane extends JPanel { Line 1014  public class XMapPane extends JPanel {
1014           */           */
1015          protected void drawRectangle(final Graphics graphics, final Point startPos,          protected void drawRectangle(final Graphics graphics, final Point startPos,
1016                          final Point e) {                          final Point e) {
1017                  drawRectangle(graphics, startPos, e, Color.WHITE);                  drawRectangle(graphics, startPos, e, Color.WHITE, false);
1018          }          }
1019    
1020          /**          /**
# Line 1022  public class XMapPane extends JPanel { Line 1022  public class XMapPane extends JPanel {
1022           * given point. All in screen coordinates.           * given point. All in screen coordinates.
1023           */           */
1024          protected void drawRectangle(final Graphics graphics, final Point startPos,          protected void drawRectangle(final Graphics graphics, final Point startPos,
1025                          final Point e, Color color) {                          final Point e, Color color, boolean fill) {
1026    
1027                  if (!isWellDefined())                  if (!isWellDefined())
1028                          return;                          return;
# Line 1039  public class XMapPane extends JPanel { Line 1039  public class XMapPane extends JPanel {
1039                          return;                          return;
1040    
1041                  graphics.setXORMode(color);                  graphics.setXORMode(color);
1042                    
1043                    if (fill) {
1044                            graphics.fillRect(left, bottom, width, height);
1045                            graphics.setXORMode(Color.WHITE);      
1046                    }
1047                    
1048                    
1049                  graphics.drawRect(left, bottom, width, height);                  graphics.drawRect(left, bottom, width, height);
1050          }          }
1051    
# Line 2005  public class XMapPane extends JPanel { Line 2012  public class XMapPane extends JPanel {
2012                  xMapPaneMouseListener.actions.put(type, action);                  xMapPaneMouseListener.actions.put(type, action);
2013          }          }
2014                    
2015            /**
2016             * Configure the tool that active on the map
2017             */
2018          public void setTool(XMapPaneTool tool) {          public void setTool(XMapPaneTool tool) {
2019                  this.tool = tool;                  this.tool = tool;
2020                  xMapPaneMouseListener.configure(tool);                  xMapPaneMouseListener.configure(tool);

Legend:
Removed from v.653  
changed lines
  Added in v.654

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26