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

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

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

branches/2.0-RC2/src/skrueger/geotools/MapPaneToolBar.java revision 655 by alfonx, Wed Feb 3 11:47:44 2010 UTC trunk/src/skrueger/geotools/MapPaneToolBar.java revision 685 by alfonx, Wed Feb 10 15:04:02 2010 UTC
# Line 96  public class MapPaneToolBar extends JToo Line 96  public class MapPaneToolBar extends JToo
96    
97          /** Constant for the tool "Zoom In" (110). */          /** Constant for the tool "Zoom In" (110). */
98          public static final int TOOL_ZOOMIN = 110;          public static final int TOOL_ZOOMIN = 110;
99            public static final int ACTION_ZOOM_DEFAULT = 150;
100          /** Constant for the tool "Zoom Out" (120). */          /** Constant for the tool "Zoom Out" (120). */
101          public static final int TOOL_ZOOMOUT = 120;          public static final int TOOL_ZOOMOUT = 120;
102          /** Constant for the action "Zoom back" (130). */          /** Constant for the action "Zoom back" (130). */
# Line 318  public class MapPaneToolBar extends JToo Line 319  public class MapPaneToolBar extends JToo
319  //                              MapView.class.getResource("resource/icons/info.png")),  //                              MapView.class.getResource("resource/icons/info.png")),
320  //                              R("MapPaneButtons.Info.TT")), false);  //                              R("MapPaneButtons.Info.TT")), false);
321                  addTool(new MapPaneToolBarAction(TOOL_INFO, this, XMapPaneTool.INFO), false);                  addTool(new MapPaneToolBarAction(TOOL_INFO, this, XMapPaneTool.INFO), false);
322                    
323                  // Zoom in                  // Zoom in
324                  addTool(new MapPaneToolBarAction(TOOL_ZOOMIN, this, XMapPaneTool.ZOOM_IN), false);                  addTool(new MapPaneToolBarAction(TOOL_ZOOMIN, this, XMapPaneTool.ZOOM_IN), false);
325                                    
# Line 491  public class MapPaneToolBar extends JToo Line 492  public class MapPaneToolBar extends JToo
492          protected void performActionButton(int action, ActionEvent e) {          protected void performActionButton(int action, ActionEvent e) {
493                  if (mapPane == null)                  if (mapPane == null)
494                          return;                          return;
495                    
496                  // Perform the action "Zoom back": Revert the last zoom                  // Perform the action "Zoom back": Revert the last zoom
497                  if (action == ACTION_ZOOM_BACK) {                  if (action == ACTION_ZOOM_BACK) {
498                          if (zoomBackIndex <= 1)                          if (zoomBackIndex <= 1)
# Line 914  public class MapPaneToolBar extends JToo Line 915  public class MapPaneToolBar extends JToo
915                  }                  }
916    
917                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar, XMapPaneTool tool) {                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar, XMapPaneTool tool) {
918                          this(id, toolBar, "", tool.icon, tool.toolTip);                          this(id, toolBar, "", tool.getIcon(), tool.getToolTip());
919                  }                  }
920    
921                  /**                  /**

Legend:
Removed from v.655  
changed lines
  Added in v.685

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26