Changeset 6032 in josm for trunk


Ignore:
Timestamp:
2013-06-26T21:44:13+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8809 - Add Help button to "open location" error dialog + javadoc fixes in download tasks

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r6031 r6032  
    2020import javax.swing.JOptionPane;
    2121import javax.swing.JPanel;
    22 import javax.swing.SwingUtilities;
    2322
    2423import org.openstreetmap.josm.Main;
    2524import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask;
    2625import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmChangeCompressedTask;
     26import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmChangeTask;
    2727import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmCompressedTask;
    28 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmChangeTask;
    2928import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
    3029import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmUrlTask;
     
    3231import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
    3332import org.openstreetmap.josm.gui.ExtendedDialog;
     33import org.openstreetmap.josm.gui.HelpAwareOptionPane;
     34import org.openstreetmap.josm.gui.help.HelpUtil;
    3435import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    35 import org.openstreetmap.josm.gui.util.GuiHelper;
    3636import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    3737import org.openstreetmap.josm.tools.Shortcut;
     
    150150    /**
    151151     * Summarizes acceptable urls for error message purposes.
    152      * @since 6030
     152     * @return The HTML message to be displayed
     153     * @since 6031
    153154     */
    154155    public String findSummaryDocumentation() {
     
    186187        } else {
    187188            final String details = findSummaryDocumentation();    // Explain what patterns are supported
    188             SwingUtilities.invokeLater(new Runnable() {
    189                 @Override
    190                 public void run() {
    191                     JOptionPane.showMessageDialog(Main.parent, tr(
    192                             "<html><p>Cannot open URL ''{0}''<br/>The following load tasks accept the URL patterns shown:<br/>{1}</p></html>",
    193                             url, details), tr("Download Location"), JOptionPane.ERROR_MESSAGE);
    194                 }
    195             });
     189            HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, tr(
     190                    "<html><p>Cannot open URL ''{0}''<br/>The following download tasks accept the URL patterns shown:<br/>{1}</p></html>",
     191                    url, details), tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation"));
    196192        }
    197193    }
    198194   
     195    /**
     196     * Adds a new download task to the supported ones.
     197     * @param taskClass The new download task to add
     198     * @return <tt>true</tt> (as specified by {@link Collection#add})
     199     */
    199200    public boolean addDownloadTaskClass(Class<? extends DownloadTask> taskClass) {
    200201        return this.downloadTasks.add(taskClass);
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java

    r6031 r6032  
    66import org.openstreetmap.josm.io.XmlWriter;
    77
     8/**
     9 * Common abstract implementation of other download tasks
     10 * @since 2322
     11 */
    812public abstract class AbstractDownloadTask implements DownloadTask {
    913    private List<Object> errorMessages;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeCompressedTask.java

    r6031 r6032  
    1212import org.openstreetmap.josm.io.OsmTransferException;
    1313
     14/**
     15 * Task allowing to download compressed OSM-Change files (gzip and bzip2)
     16 * @since 5361
     17 */
    1418public class DownloadOsmChangeCompressedTask extends DownloadOsmChangeTask {
    1519
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java

    r6031 r6032  
    1313import org.openstreetmap.josm.io.OsmTransferException;
    1414
     15/**
     16 * Task allowing to download compressed OSM files (gzip and bzip2)
     17 * @since 5317
     18 */
    1519public class DownloadOsmCompressedTask extends DownloadOsmTask {
    1620
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmUrlTask.java

    r6031 r6032  
    99import org.openstreetmap.josm.tools.OsmUrlToBounds;
    1010
     11/**
     12 * Task allowing to download an OSM url containing coordinates
     13 * @since 4996
     14 */
    1115public class DownloadOsmUrlTask extends DownloadOsmTask {
    1216
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTask.java

    r6031 r6032  
    8080
    8181    /**
    82      * Returns a short html documentation string, describing acceptable URLs.
     82     * Returns a short HTML documentation string, describing acceptable URLs.
     83     * @return The HTML documentation
     84     * @since 6031
    8385     */
    8486    String acceptsDocumentationSummary();
     
    8688    /**
    8789     * Returns human-readable description of the task
     90     * @return The task description
     91     * @since 6031
    8892     */
    8993    String getTitle();
    9094   
    9195    /**
    92      * Returns regular expression that match the URLs
     96     * Returns regular expressions that match the URLs
     97     * @return The array of accepted URL patterns
     98     * @since 6031
    9399     */
    94100    String[] getPatterns();
Note: See TracChangeset for help on using the changeset viewer.