Ignore:
Timestamp:
2021-10-17T06:14:05+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21430 - Fix deletion of images (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java

    r18246 r18278  
    88import java.time.Instant;
    99import java.util.List;
     10
    1011import javax.imageio.IIOParam;
    1112
     
    1617 * An interface for image entries that will be shown in {@link org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay}
    1718 * @author Taylor Smock
     19 * @param <I> type of image
    1820 * @since 18246
    1921 */
     
    9496
    9597    /**
     98     * Delete the image
     99     * @return {@code true} if deletion was successful
     100     * @throws UnsupportedOperationException If the implementation does not support deletion.
     101     * Use {@link #isDeleteSupported()}} to check for support.
     102     * @since 18278
     103     */
     104    default boolean delete() {
     105        throw new UnsupportedOperationException("remove is not supported for " + this.getClass().getSimpleName());
     106    }
     107
     108    /**
     109     * Check if image deletion is supported
     110     * @return {@code true} if deletion is supported
     111     * @since 18278
     112     */
     113    default boolean isDeleteSupported() {
     114        return false;
     115    }
     116
     117    /**
    96118     * Returns a display name for this entry (shown in image viewer title bar)
    97119     * @return a display name for this entry
Note: See TracChangeset for help on using the changeset viewer.