Ignore:
Timestamp:
2017-05-11T00:18:12+02:00 (8 years ago)
Author:
michael2402
Message:

Allow invalidation listeners for all MapViewPaintables.

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
2 edited

Legend:

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

    r12014 r12107  
    7070    }
    7171
    72     /**
    73      * Adds a new paintable invalidation listener.
    74      * @param l The listener to add.
    75      */
     72    @Override
    7673    public void addInvalidationListener(PaintableInvalidationListener l) {
    7774        invalidationListeners.add(l);
    7875    }
    7976
    80     /**
    81      * Removes an added paintable invalidation listener.
    82      * @param l The listener to remove.
    83      */
     77    @Override
    8478    public void removeInvalidationListener(PaintableInvalidationListener l) {
    8579        invalidationListeners.remove(l);
  • trunk/src/org/openstreetmap/josm/gui/layer/MapViewPaintable.java

    r11713 r12107  
    142142     */
    143143    void paint(Graphics2D g, MapView mv, Bounds bbox);
     144
     145    /**
     146     * Adds a new paintable invalidation listener.
     147     * @param l The listener to add.
     148     * @since 12107
     149     */
     150    default void addInvalidationListener(PaintableInvalidationListener l) {
     151    }
     152
     153    /**
     154     * Removes an added paintable invalidation listener. May throw an exception if the listener is added twice.
     155     * @param l The listener to remove.
     156     * @since 12107
     157     */
     158    default void removeInvalidationListener(PaintableInvalidationListener l) {
     159    }
     160
    144161}
Note: See TracChangeset for help on using the changeset viewer.