/[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 694 by alfonx, Fri Feb 12 11:28:41 2010 UTC
# Line 59  import schmitzm.geotools.map.event.MapPa Line 59  import schmitzm.geotools.map.event.MapPa
59  import schmitzm.lang.LangUtil;  import schmitzm.lang.LangUtil;
60  import schmitzm.lang.ResourceProvider;  import schmitzm.lang.ResourceProvider;
61  import schmitzm.swing.ButtonGroup;  import schmitzm.swing.ButtonGroup;
 import schmitzm.swing.SwingUtil;  
62  import skrueger.swing.SmallButton;  import skrueger.swing.SmallButton;
63  import skrueger.swing.SmallToggleButton;  import skrueger.swing.SmallToggleButton;
64    
# Line 96  public class MapPaneToolBar extends JToo Line 95  public class MapPaneToolBar extends JToo
95    
96          /** Constant for the tool "Zoom In" (110). */          /** Constant for the tool "Zoom In" (110). */
97          public static final int TOOL_ZOOMIN = 110;          public static final int TOOL_ZOOMIN = 110;
98            public static final int ACTION_ZOOM_DEFAULT = 150;
99          /** Constant for the tool "Zoom Out" (120). */          /** Constant for the tool "Zoom Out" (120). */
100          public static final int TOOL_ZOOMOUT = 120;          public static final int TOOL_ZOOMOUT = 120;
101          /** Constant for the action "Zoom back" (130). */          /** Constant for the action "Zoom back" (130). */
# Line 318  public class MapPaneToolBar extends JToo Line 318  public class MapPaneToolBar extends JToo
318  //                              MapView.class.getResource("resource/icons/info.png")),  //                              MapView.class.getResource("resource/icons/info.png")),
319  //                              R("MapPaneButtons.Info.TT")), false);  //                              R("MapPaneButtons.Info.TT")), false);
320                  addTool(new MapPaneToolBarAction(TOOL_INFO, this, XMapPaneTool.INFO), false);                  addTool(new MapPaneToolBarAction(TOOL_INFO, this, XMapPaneTool.INFO), false);
321                    
322                  // Zoom in                  // Zoom in
323                  addTool(new MapPaneToolBarAction(TOOL_ZOOMIN, this, XMapPaneTool.ZOOM_IN), false);                  addTool(new MapPaneToolBarAction(TOOL_ZOOMIN, this, XMapPaneTool.ZOOM_IN), false);
324                                    
# Line 491  public class MapPaneToolBar extends JToo Line 491  public class MapPaneToolBar extends JToo
491          protected void performActionButton(int action, ActionEvent e) {          protected void performActionButton(int action, ActionEvent e) {
492                  if (mapPane == null)                  if (mapPane == null)
493                          return;                          return;
494                    
495                  // Perform the action "Zoom back": Revert the last zoom                  // Perform the action "Zoom back": Revert the last zoom
496                  if (action == ACTION_ZOOM_BACK) {                  if (action == ACTION_ZOOM_BACK) {
497                          if (zoomBackIndex <= 1)                          if (zoomBackIndex <= 1)
# Line 914  public class MapPaneToolBar extends JToo Line 914  public class MapPaneToolBar extends JToo
914                  }                  }
915    
916                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar, XMapPaneTool tool) {                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar, XMapPaneTool tool) {
917                          this(id, toolBar, "", tool.icon, tool.toolTip);                          this(id, toolBar, "", tool.getIcon(), tool.getToolTip());
918                  }                  }
919    
920                  /**                  /**

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26