Changeset 2619 in josm for trunk/src/org
- Timestamp:
- 2009-12-12T16:48:14+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r2512 r2619 61 61 * The listener of the active layer changes. You may register/deregister yourself 62 62 * while an LayerChangeListener - action is executed. 63 */ 63 * 64 * @deprecated use {@see #addLayerChangeListener(LayerChangeListener)} 65 * and {@see #removeLayerChangeListener(LayerChangeListener)} 66 */ 67 @Deprecated 64 68 public static final Collection<LayerChangeListener> listeners = new CopyOnWriteArrayList<LayerChangeListener>(); 69 70 /** 71 * Adds a layer change listener 72 * 73 * @param listener the listener. Ignored if null or already registered. 74 */ 75 public static void addLayerChangeListener(LayerChangeListener listener) { 76 if (listener != null && ! listeners.contains(listener)) { 77 listeners.add(listener); 78 } 79 } 80 81 /** 82 * Removes a layer change listener 83 * 84 * @param listener the listener. Ignored if null or already registered. 85 */ 86 public static void removeLayerChangeListener(LayerChangeListener listener) { 87 if (listener != null && listeners.contains(listener)) { 88 listeners.remove(listener); 89 } 90 } 65 91 66 92 /**
Note:
See TracChangeset
for help on using the changeset viewer.