Changeset 10277 in josm for trunk/src/org/openstreetmap/josm/gui/MapView.java
- Timestamp:
- 2016-05-25T08:48:50+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r10271 r10277 95 95 * Interface to notify listeners of a layer change. 96 96 * <p> 97 * To be removed: end of 2016. Use {@link org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener} instead. 97 * To be removed: end of 2016. 98 * @deprecated Use {@link org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener} instead. 98 99 * @author imi 99 100 */ … … 124 125 * An interface that needs to be implemented in order to listen for changes to the active edit layer. 125 126 * <p> 126 * To be removed: end of 2016. Use {@link ActiveLayerChangeListener} instead. 127 * To be removed: end of 2016. 128 * @deprecated Use {@link ActiveLayerChangeListener} instead. 127 129 */ 128 130 @Deprecated … … 319 321 * Removes a layer change listener 320 322 * <p> 321 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.323 * To be removed: end of 2016. 322 324 * 323 325 * @param listener the listener. Ignored if null or not registered. 326 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 324 327 */ 325 328 @Deprecated … … 330 333 } catch (IllegalArgumentException e) { 331 334 // Ignored in old implementation 335 if (Main.isDebugEnabled()) { 336 Main.debug(e.getMessage()); 337 } 332 338 } 333 339 try { … … 335 341 } catch (IllegalArgumentException e) { 336 342 // Ignored in old implementation 343 if (Main.isDebugEnabled()) { 344 Main.debug(e.getMessage()); 345 } 337 346 } 338 347 } … … 341 350 * Removes an edit layer change listener 342 351 * <p> 343 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.352 * To be removed: end of 2016. 344 353 * 345 354 * @param listener the listener. Ignored if null or not registered. 355 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 346 356 */ 347 357 @Deprecated … … 351 361 } catch (IllegalArgumentException e) { 352 362 // Ignored in old implementation 363 if (Main.isDebugEnabled()) { 364 Main.debug(e.getMessage()); 365 } 353 366 } 354 367 } … … 357 370 * Adds a layer change listener 358 371 * <p> 359 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.372 * To be removed: end of 2016. 360 373 * 361 374 * @param listener the listener. Ignored if null or already registered. 375 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 362 376 */ 363 377 @Deprecated … … 369 383 * Adds a layer change listener 370 384 * <p> 371 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.385 * To be removed: end of 2016. 372 386 * 373 387 * @param listener the listener. Ignored if null or already registered. 374 388 * @param initialFire fire an active-layer-changed-event right after adding 375 389 * the listener in case there is a layer present (should be) 390 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 376 391 */ 377 392 @Deprecated … … 390 405 * Adds an edit layer change listener 391 406 * <p> 392 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.407 * To be removed: end of 2016. 393 408 * 394 409 * @param listener the listener. Ignored if null or already registered. 395 410 * @param initialFire fire an edit-layer-changed-event right after adding 396 411 * the listener in case there is an edit layer present 412 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 397 413 */ 398 414 @Deprecated 399 415 public static void addEditLayerChangeListener(EditLayerChangeListener listener, boolean initialFire) { 400 416 if (listener != null) { 401 Main.getLayerManager().addActiveLayerChangeListener(new EditLayerChangeAdapter(listener), initialFire && Main.isDisplayingMapView() && Main.map.mapView.getEditLayer() != null); 417 Main.getLayerManager().addActiveLayerChangeListener(new EditLayerChangeAdapter(listener), 418 initialFire && Main.isDisplayingMapView() && Main.map.mapView.getEditLayer() != null); 402 419 } 403 420 } … … 406 423 * Adds an edit layer change listener 407 424 * <p> 408 * You should register the listener on {@link Main#getLayerManager()} instead.To be removed: end of 2016.425 * To be removed: end of 2016. 409 426 * 410 427 * @param listener the listener. Ignored if null or already registered. 428 * @deprecated You should register the listener on {@link Main#getLayerManager()} instead. 411 429 */ 412 430 @Deprecated … … 545 563 * Add a layer to the current MapView. 546 564 * <p> 547 * Use {@link Main#getLayerManager()}.addLayer() instead.To be removed: end of 2016.565 * To be removed: end of 2016. 548 566 * @param layer The layer to add 567 * @deprecated Use {@link Main#getLayerManager()}.addLayer() instead. 549 568 */ 550 569 @Deprecated … … 574 593 575 594 /** 576 * Use {@link Main#getLayerManager()} instead. To be removed: end of 2016. 595 * Returns current data set. To be removed: end of 2016. 596 * @deprecated Use {@link Main#getLayerManager()} instead. 577 597 */ 578 598 @Override … … 602 622 603 623 /** 604 * Determines the next active data layer according to the following 605 * rules: 624 * Determines the next active data layer according to the following rules: 606 625 * <ul> 607 626 * <li>if there is at least one {@link OsmDataLayer} the first one … … 609 628 * <li>otherwise, the top most layer of any type becomes active</li> 610 629 * </ul> 611 * To be removed: end of 2016 (now handled by {@link LayerManagerWithActive}630 * To be removed: end of 2016. 612 631 * @param layersList lit of layers 613 632 * 614 633 * @return the next active data layer 634 * @deprecated now handled by {@link LayerManagerWithActive} 615 635 */ 616 636 @Deprecated … … 634 654 * an LayerChange event is fired. 635 655 * <p> 636 * Use {@link Main#getLayerManager()}.removeLayer() instead.To be removed: end of 2016.656 * To be removed: end of 2016. 637 657 * @param layer The layer to remove 658 * @deprecated Use {@link Main#getLayerManager()}.removeLayer() instead. 638 659 */ 639 660 @Deprecated … … 696 717 * Gets the index of the layer in the layer list. 697 718 * <p> 698 * Access the layer list using {@link Main#getLayerManager()} instead.To be removed: end of 2016.719 * To be removed: end of 2016. 699 720 * @param layer The layer to search for. 700 721 * @return The index in the list. 701 722 * @throws IllegalArgumentException if that layer does not belong to this view. 723 * @deprecated Access the layer list using {@link Main#getLayerManager()} instead. 702 724 */ 703 725 @Deprecated … … 919 941 920 942 /** 921 * Use {@link LayerManager#getLayers()} instead. To be removed: end of 2016.943 * Returns all layers. To be removed: end of 2016. 922 944 * 923 945 * @return An unmodifiable collection of all layers 946 * @deprecated Use {@link LayerManager#getLayers()} instead. 924 947 */ 925 948 @Deprecated … … 929 952 930 953 /** 931 * Use {@link LayerManager#getLayers()} instead. To be removed: end of 2016.954 * Returns all layers as list. To be removed: end of 2016. 932 955 * 933 956 * @return An unmodifiable ordered list of all layers 957 * @deprecated Use {@link LayerManager#getLayers()} instead. 934 958 */ 935 959 @Deprecated … … 945 969 * List<WMSLayer> wmsLayers = getLayersOfType(WMSLayer.class); 946 970 * </pre> 947 * Use {@link LayerManager#getLayersOfType(Class)} instead.948 971 * 949 972 * @param <T> layer type … … 951 974 * @param ofType The layer type. 952 975 * @return an unmodifiable list of layers of a certain type. 976 * @deprecated Use {@link LayerManager#getLayersOfType(Class)} instead. 953 977 */ 954 978 @Deprecated … … 960 984 * Replies the number of layers managed by this map view. To be removed: end of 2016. 961 985 * <p> 962 * You can use {@link Main#getLayerManager()}.getLayers().size() instead.963 986 * 964 987 * @return the number of layers managed by this map view 988 * @deprecated Use {@link Main#getLayerManager()}.getLayers().size() instead. 965 989 */ 966 990 @Deprecated … … 972 996 * Replies true if there is at least one layer in this map view 973 997 * <p> 974 * You can use !{@link Main#getLayerManager()}.getLayers().isEmpty() instead.975 998 * 976 999 * @return true if there is at least one layer in this map view 1000 * @deprecated Use !{@link Main#getLayerManager()}.getLayers().isEmpty() instead. 977 1001 */ 978 1002 @Deprecated … … 985 1009 * of {@link OsmDataLayer} also sets editLayer to <code>layer</code>. 986 1010 * <p> 987 * You can use !{@link Main#getLayerManager()}.setActiveLayer() instead.988 1011 * 989 1012 * @param layer the layer to be activate; must be one of the layers in the list of layers 990 1013 * @throws IllegalArgumentException if layer is not in the list of layers 1014 * @deprecated Use !{@link Main#getLayerManager()}.setActiveLayer() instead. 991 1015 */ 992 1016 @Deprecated 993 1017 public void setActiveLayer(Layer layer) { 994 layerManager.setActiveLayer(layer); 995 } 1018 layerManager.setActiveLayer(layer); 1019 } 1020 996 1021 /** 997 1022 * Replies the currently active layer 998 1023 * <p> 999 * You can use !{@link Main#getLayerManager()}.getActiveLayer() instead.1000 1024 * 1001 1025 * @return the currently active layer (may be null) 1026 * @deprecated Use !{@link Main#getLayerManager()}.getActiveLayer() instead. 1002 1027 */ 1003 1028 @Deprecated … … 1034 1059 * Replies the current edit layer, if any 1035 1060 * <p> 1036 * You can use !{@link Main#getLayerManager()}.getEditLayer() instead. To be made private: end of 2016.1037 1061 * 1038 1062 * @return the current edit layer. May be null. 1063 * @deprecated Use !{@link Main#getLayerManager()}.getEditLayer() instead. To be made private: end of 2016. 1039 1064 */ 1040 1065 @Deprecated … … 1046 1071 * replies true if the list of layers managed by this map view contain layer 1047 1072 * <p> 1048 * You can use !{@link Main#getLayerManager()}.containsLayer() instead.1049 1073 * 1050 1074 * @param layer the layer 1051 1075 * @return true if the list of layers managed by this map view contain layer 1076 * @deprecated Use !{@link Main#getLayerManager()}.containsLayer() instead. 1052 1077 */ 1053 1078 @Deprecated
Note:
See TracChangeset
for help on using the changeset viewer.