/[schmitzm]/branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction_Zoom.java
ViewVC logotype

Diff of /branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction_Zoom.java

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

branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction_ZoomIn.java revision 644 by alfonx, Thu Jan 28 16:28:36 2010 UTC branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction_Zoom.java revision 646 by alfonx, Thu Jan 28 16:47:13 2010 UTC
# Line 10  import org.opengis.geometry.DirectPositi Line 10  import org.opengis.geometry.DirectPositi
10  import com.vividsolutions.jts.geom.Coordinate;  import com.vividsolutions.jts.geom.Coordinate;
11  import com.vividsolutions.jts.geom.Envelope;  import com.vividsolutions.jts.geom.Envelope;
12    
13  public class XMapPaneAction_ZoomIn implements XMapPaneAction {  public abstract class XMapPaneAction_Zoom implements XMapPaneAction {
14    
15    public static class In extends XMapPaneAction_Zoom {
16    
17          @Override          @Override
18          public void performClick(XMapPane mapPane, MouseEvent ev,          public void performClick(XMapPane mapPane, MouseEvent ev,
# Line 36  public class XMapPaneAction_ZoomIn imple Line 38  public class XMapPaneAction_ZoomIn imple
38                          DirectPosition endCoord) {                          DirectPosition endCoord) {
39    
40                  if (dragLastPos != null)                  if (dragLastPos != null)
41                          mapPane.drawRectangle(mapPane.getGraphics(), dragLastPos, ev                          mapPane.drawRectangle(mapPane.getGraphics(), dragStartPos, dragLastPos);
                                         .getPoint());  
42    
43                  mapPane.drawRectangle(mapPane.getGraphics(), dragStartPos, ev                  mapPane.drawRectangle(mapPane.getGraphics(), dragStartPos, ev
44                                  .getPoint());                                  .getPoint());
# Line 49  public class XMapPaneAction_ZoomIn imple Line 50  public class XMapPaneAction_ZoomIn imple
50                          DirectPosition endCoord) {                          DirectPosition endCoord) {
51    
52                  if (dragLastPos != null)                  if (dragLastPos != null)
53                          mapPane.drawRectangle(mapPane.getGraphics(), dragLastPos, ev                          mapPane.drawRectangle(mapPane.getGraphics(), dragStartPos, dragLastPos );
                                         .getPoint());  
54    
55                  // If this is similar to a click, let mouseClicked handle it!                  // If this is similar to a click, let mouseClicked handle it!
56                  if ((Math.abs(dragStartPos.x - ev.getPoint().x) * Math.abs(ev                  if ((Math.abs(dragStartPos.x - ev.getPoint().x) * Math.abs(ev
# Line 89  public class XMapPaneAction_ZoomIn imple Line 89  public class XMapPaneAction_ZoomIn imple
89          }          }
90    
91  }  }
92    
93    }

Legend:
Removed from v.644  
changed lines
  Added in v.646

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26