Ignore:
Timestamp:
2006-05-03T22:21:02+02:00 (18 years ago)
Author:
imi
Message:
  • added zoom/move around with Ctrl+direction keys / Ctrl +, Ctrl -
  • added progress bar counter of downloaded bytes
  • added support for little-osm (relaxed assumptions about osm/xml input format)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/MapView.java

    r100 r101  
    8484        private final AutoScaleAction autoScaleAction;
    8585
    86        
     86
    8787        private final class Scaler extends JSlider implements PropertyChangeListener, ChangeListener {
    8888                boolean clicked = false;
     
    9191                        addMouseListener(new MouseAdapter(){
    9292                                @Override public void mousePressed(MouseEvent e) {
    93                         clicked = true;
    94                 }
     93                                        clicked = true;
     94                                }
    9595                                @Override public void mouseReleased(MouseEvent e) {
    96                         clicked = false;
    97                 }
     96                                        clicked = false;
     97                                }
    9898                        });
    99                         MapView.this.addPropertyChangeListener(this);
     99                        MapView.this.addPropertyChangeListener("scale", this);
    100100                        addChangeListener(this);
    101         }
     101                }
    102102                public void propertyChange(PropertyChangeEvent evt) {
    103                         if (evt.getPropertyName().equals("scale") && !getModel().getValueIsAdjusting())
     103                        if (!getModel().getValueIsAdjusting())
    104104                                setValue(zoom());
    105         }
     105                }
    106106                public void stateChanged(ChangeEvent e) {
    107107                        if (!clicked)
     
    114114                        else
    115115                                zoomTo(center, pos.north()*2/(MapView.this.getHeight()-20));
    116         }
    117         }
    118        
     116                }
     117        }
     118
    119119        public MapView(AutoScaleAction autoScaleAction) {
    120120                this.autoScaleAction = autoScaleAction;
     
    154154                        Main.ds = dataLayer.data;
    155155                        dataLayer.listenerModified.add(new ModifiedChangedListener(){
    156                 public void modifiedChanged(boolean value, OsmDataLayer source) {
    157                         JOptionPane.getFrameForComponent(Main.parent).setTitle((value?"*":"")+"Java Open Street Map - Editor");
    158                 }
    159             });
     156                                public void modifiedChanged(boolean value, OsmDataLayer source) {
     157                                        JOptionPane.getFrameForComponent(Main.parent).setTitle((value?"*":"")+"Java Open Street Map - Editor");
     158                                }
     159                        });
    160160                }
    161161
Note: See TracChangeset for help on using the changeset viewer.