Changeset 16563 in josm for trunk/src/org


Ignore:
Timestamp:
2020-06-07T18:45:04+02:00 (4 years ago)
Author:
simon04
Message:

fix #19357 - MapPaintStylesUpdateListener: fix typo

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r15717 r16563  
    6767import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker;
    6868import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    69 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
     69import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintStylesUpdateListener;
    7070import org.openstreetmap.josm.gui.util.GuiHelper;
    7171import org.openstreetmap.josm.io.audio.AudioPlayer;
     
    9595
    9696    static {
    97         MapPaintStyles.addMapPaintSylesUpdateListener(new MapPaintSylesUpdateListener() {
     97        MapPaintStyles.addMapPaintStylesUpdateListener(new MapPaintStylesUpdateListener() {
    9898            @Override
    9999            public void mapPaintStylesUpdated() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r16438 r16563  
    6060import org.openstreetmap.josm.gui.SideButton;
    6161import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    62 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
     62import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintStylesUpdateListener;
    6363import org.openstreetmap.josm.gui.mappaint.StyleSettingGroupGui;
    6464import org.openstreetmap.josm.gui.mappaint.StyleSource;
     
    180180    @Override
    181181    public void showNotify() {
    182         MapPaintStyles.addMapPaintSylesUpdateListener(model);
     182        MapPaintStyles.addMapPaintStylesUpdateListener(model);
    183183        model.mapPaintStylesUpdated();
    184184        MainApplication.getMenu().wireFrameToggleAction.addButtonModel(cbWireframe.getModel());
     
    188188    public void hideNotify() {
    189189        MainApplication.getMenu().wireFrameToggleAction.removeButtonModel(cbWireframe.getModel());
    190         MapPaintStyles.removeMapPaintSylesUpdateListener(model);
    191     }
    192 
    193     protected class StylesModel extends AbstractTableModel implements MapPaintSylesUpdateListener {
     190        MapPaintStyles.removeMapPaintStylesUpdateListener(model);
     191    }
     192
     193    protected class StylesModel extends AbstractTableModel implements MapPaintStylesUpdateListener {
    194194
    195195        private final Class<?>[] columnClasses = {Boolean.class, StyleSource.class};
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r16509 r16563  
    1717import org.openstreetmap.josm.gui.layer.GpxLayer;
    1818import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    19 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
     19import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintStylesUpdateListener;
    2020import org.openstreetmap.josm.gui.util.StayOpenCheckBoxMenuItem;
    2121import org.openstreetmap.josm.tools.ImageProvider;
     
    2525 * @since 5086
    2626 */
    27 public class MapPaintMenu extends JMenu implements MapPaintSylesUpdateListener {
     27public class MapPaintMenu extends JMenu implements MapPaintStylesUpdateListener {
    2828
    2929    private static class MapPaintAction extends JosmAction {
     
    8888        super(tr("Map Paint Styles"));
    8989        setIcon(ImageProvider.get("dialogs", "mapstyle", ImageProvider.ImageSizes.MENU));
    90         MapPaintStyles.addMapPaintSylesUpdateListener(this);
     90        MapPaintStyles.addMapPaintStylesUpdateListener(this);
    9191        putClientProperty("help", ht("/Dialog/MapPaint"));
    9292    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r16562 r16563  
    3737 * the ElemStyles singleton.
    3838 *
    39  * On change, {@link MapPaintSylesUpdateListener#mapPaintStylesUpdated()} is fired
     39 * On change, {@link MapPaintStylesUpdateListener#mapPaintStylesUpdated()} is fired
    4040 * for all listeners.
    4141 */
     
    4646            "misc/deprecated.png");
    4747
    48     private static final ListenerList<MapPaintSylesUpdateListener> listeners = ListenerList.createUnchecked();
     48    private static final ListenerList<MapPaintStylesUpdateListener> listeners = ListenerList.createUnchecked();
    4949
    5050    private static final class MapPaintStylesPreferenceListener implements PreferenceChangedListener {
     
    6767
    6868    static {
    69         listeners.addListener(new MapPaintSylesUpdateListener() {
     69        listeners.addListener(new MapPaintStylesUpdateListener() {
    7070            @Override
    7171            public void mapPaintStylesUpdated() {
     
    316316            }
    317317        }
    318         fireMapPaintSylesUpdated();
     318        fireMapPaintStylesUpdated();
    319319    }
    320320
     
    373373        styles.setStyleSources(data);
    374374        MapPaintPrefHelper.INSTANCE.put(data);
    375         fireMapPaintSylesUpdated();
     375        fireMapPaintStylesUpdated();
    376376    }
    377377
     
    413413            fireMapPaintStyleEntryUpdated(sel[0]);
    414414        } else {
    415             fireMapPaintSylesUpdated();
     415            fireMapPaintStylesUpdated();
    416416        }
    417417    }
     
    444444    private static void refreshStyles() {
    445445        MapPaintPrefHelper.INSTANCE.put(styles.getStyleSources());
    446         fireMapPaintSylesUpdated();
     446        fireMapPaintStylesUpdated();
    447447    }
    448448
    449449    /***********************************
    450      * MapPaintSylesUpdateListener &amp; related code
     450     * MapPaintStylesUpdateListener &amp; related code
    451451     *  (get informed when the list of MapPaint StyleSources changes)
    452452     */
    453     public interface MapPaintSylesUpdateListener {
     453    public interface MapPaintStylesUpdateListener {
    454454        /**
    455455         * Called on any style source changes that are not handled by {@link #mapPaintStyleEntryUpdated(int)}
     
    468468     * @param listener The listener
    469469     */
    470     public static void addMapPaintSylesUpdateListener(MapPaintSylesUpdateListener listener) {
     470    public static void addMapPaintStylesUpdateListener(MapPaintStylesUpdateListener listener) {
    471471        listeners.addListener(listener);
    472472    }
     
    476476     * @param listener The listener
    477477     */
    478     public static void removeMapPaintSylesUpdateListener(MapPaintSylesUpdateListener listener) {
     478    public static void removeMapPaintStylesUpdateListener(MapPaintStylesUpdateListener listener) {
    479479        listeners.removeListener(listener);
    480480    }
     
    483483     * Notifies all listeners that there was any update to the map paint styles
    484484     */
    485     public static void fireMapPaintSylesUpdated() {
    486         listeners.fireEvent(MapPaintSylesUpdateListener::mapPaintStylesUpdated);
     485    public static void fireMapPaintStylesUpdated() {
     486        listeners.fireEvent(MapPaintStylesUpdateListener::mapPaintStylesUpdated);
    487487    }
    488488
  • trunk/src/org/openstreetmap/josm/gui/mappaint/loader/MapPaintStyleLoader.java

    r16438 r16563  
    4141    @Override
    4242    protected void finish() {
    43         MapPaintStyles.fireMapPaintSylesUpdated();
     43        MapPaintStyles.fireMapPaintStylesUpdated();
    4444    }
    4545
Note: See TracChangeset for help on using the changeset viewer.