Changeset 16 in josm for src/org/openstreetmap/josm/gui/MapFrame.java
- Timestamp:
- 2005-10-08T17:14:54+02:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/MapFrame.java
r15 r16 14 14 import javax.swing.JToolBar; 15 15 16 import org.openstreetmap.josm.actions.AutoScaleAction;17 16 import org.openstreetmap.josm.actions.mapmode.AddLineSegmentAction; 18 17 import org.openstreetmap.josm.actions.mapmode.AddNodeAction; … … 26 25 import org.openstreetmap.josm.actions.mapmode.ZoomAction; 27 26 import org.openstreetmap.josm.data.osm.DataSet; 27 import org.openstreetmap.josm.gui.dialogs.PropertiesDialog; 28 28 import org.openstreetmap.josm.gui.dialogs.SelectionListDialog; 29 29 … … 43 43 * The view control displayed. 44 44 */ 45 public Layer layer;45 public MapView mapView; 46 46 /** 47 47 * The toolbar with the action icons … … 61 61 setLayout(new BorderLayout()); 62 62 63 add( layer = new Layer(dataSet), BorderLayout.CENTER);63 add(mapView = new MapView(dataSet), BorderLayout.CENTER); 64 64 65 65 // toolbar … … 84 84 // autoScale 85 85 toolBarActions.addSeparator(); 86 final JToggleButton autoScaleButton = new IconToggleButton(this, new AutoScaleAction(layer));86 final JToggleButton autoScaleButton = new IconToggleButton(this, mapView.new AutoScaleAction()); 87 87 toolBarActions.add(autoScaleButton); 88 88 autoScaleButton.setText(null); 89 autoScaleButton.setSelected( layer.isAutoScale());90 layer.addPropertyChangeListener(new PropertyChangeListener(){89 autoScaleButton.setSelected(mapView.isAutoScale()); 90 mapView.addPropertyChangeListener(new PropertyChangeListener(){ 91 91 public void propertyChange(PropertyChangeEvent evt) { 92 92 if (evt.getPropertyName().equals("autoScale")) 93 autoScaleButton.setSelected( layer.isAutoScale());93 autoScaleButton.setSelected(mapView.isAutoScale()); 94 94 } 95 95 }); 96 97 // properties 98 toolBarActions.add(new IconToggleButton(this, new PropertiesDialog(this))); 96 99 97 100 // selection dialog … … 107 110 108 111 // status line below the map 109 statusLine = new MapStatus( layer);112 statusLine = new MapStatus(mapView); 110 113 } 111 114
Note:
See TracChangeset
for help on using the changeset viewer.