Ticket #19310: 19310.patch

File 19310.patch, 1.2 KB (added by taylor.smock, 6 years ago)

Add two methods to add/remove download area listeners (really, DownloadSelection implementations)

  • src/org/openstreetmap/josm/gui/download/DownloadDialog.java

     
    322322    }
    323323
    324324    /**
     325     * Add a listener to get events from the DownloadSelection window
     326     *
     327     * @param selection The DownloadSelection object to send the Bounds to
     328     * @return See {@link List#add}
     329     * @since xxx
     330     */
     331    public boolean addDownloadAreaListener(DownloadSelection selection) {
     332        return this.downloadSelections.add(selection);
     333    }
     334
     335    /**
     336     * Remove a listener that was getting events from the DownloadSelection window
     337     *
     338     * @param selection The DownloadSelection object to not send the Bounds to
     339     * @return See {@link List#remove}
     340     * @since xxx
     341     */
     342    public boolean removeDownloadAreaListener(DownloadSelection selection) {
     343        return this.downloadSelections.remove(selection);
     344    }
     345
     346    /**
    325347     * Adds a new download source to the download dialog if it is not added.
    326348     *
    327349     * @param downloadSource The download source to be added.