Changeset 8555 in josm
- Timestamp:
- 2015-07-01T21:38:18+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r8553 r8555 23 23 import java.beans.PropertyChangeListener; 24 24 import java.util.ArrayList; 25 import java.util.Arrays; 25 26 import java.util.Collection; 26 27 import java.util.Collections; … … 302 303 removeComponentListener(this); 303 304 304 MapSlider zoomSlider = new MapSlider(MapView.this); 305 add(zoomSlider); 306 zoomSlider.setBounds(3, 0, 114, 30); 307 zoomSlider.setFocusTraversalKeysEnabled(!unregisterTab); 308 309 MapScaler scaler = new MapScaler(MapView.this); 310 add(scaler); 311 scaler.setLocation(10, 30); 305 for (JComponent c : getMapNavigationComponents(MapView.this)) { 306 MapView.this.add(c); 307 } 312 308 313 309 mapMover = new MapMover(MapView.this, contentPane); … … 341 337 setFocusTraversalKeysEnabled(false); 342 338 } 339 } 340 341 /** 342 * Adds the map navigation components to a 343 * @param forMapView The map view to get the components for. 344 * @return A list containing the correctly positioned map navigation components. 345 */ 346 public static List<? extends JComponent> getMapNavigationComponents(MapView forMapView) { 347 MapSlider zoomSlider = new MapSlider(forMapView); 348 zoomSlider.setBounds(3, 0, 114, 30); 349 zoomSlider.setFocusTraversalKeysEnabled(Shortcut.findShortcut(KeyEvent.VK_TAB, 0) == null); 350 351 MapScaler scaler = new MapScaler(forMapView); 352 scaler.setLocation(10,30); 353 354 return Arrays.asList(zoomSlider, scaler); 343 355 } 344 356
Note:
See TracChangeset
for help on using the changeset viewer.