- Timestamp:
- 2015-02-09T13:57:33+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r8015 r8020 1566 1566 * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes 1567 1567 * @param listener The MapFrameListener 1568 * @param fireWhenMapViewPresent If true, will fire an initial mapFrameInitialized event 1569 * when the MapFrame is present. Otherwise will only fire when the MapFrame is created 1570 * or destroyed. 1571 * @return {@code true} if the listeners collection changed as a result of the call 1572 */ 1573 public static boolean addMapFrameListener(MapFrameListener listener, boolean fireWhenMapViewPresent) { 1574 boolean changed = listener != null ? mapFrameListeners.add(listener) : false; 1575 if (fireWhenMapViewPresent && changed && map != null) { 1576 listener.mapFrameInitialized(null, map); 1577 } 1578 return changed; 1579 } 1580 1581 /** 1582 * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes 1583 * @param listener The MapFrameListener 1568 1584 * @return {@code true} if the listeners collection changed as a result of the call 1569 1585 * @since 5957 1570 1586 */ 1571 1587 public static boolean addMapFrameListener(MapFrameListener listener) { 1572 return listener != null ? mapFrameListeners.add(listener) : false;1588 return addMapFrameListener(listener, false); 1573 1589 } 1574 1590 -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r8017 r8020 614 614 PluginProxy pluginProxy = plugin.load(klass); 615 615 pluginList.add(pluginProxy); 616 Main.addMapFrameListener(pluginProxy );616 Main.addMapFrameListener(pluginProxy, true); 617 617 } 618 618 msg = null;
Note:
See TracChangeset
for help on using the changeset viewer.