Changeset 12675 in josm for trunk/src/org


Ignore:
Timestamp:
2017-08-27T18:12:20+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - move the Swing-based ProgressMonitor implementations from gui.progress to gui.progress.swing. Progress monitor concept is used in very large parts of JOSM, a console-based implementation could be added later

Location:
trunk/src/org/openstreetmap/josm
Files:
2 added
20 edited
3 moved

Legend:

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

    r10074 r12675  
    1919import org.openstreetmap.josm.Main;
    2020import org.openstreetmap.josm.actions.downloadtasks.DownloadTaskList;
    21 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    2221import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     22import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2323import org.openstreetmap.josm.tools.GBC;
    2424import org.openstreetmap.josm.tools.Shortcut;
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r12639 r12675  
    2626import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    2727import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    28 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     28import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2929import org.openstreetmap.josm.tools.Destroyable;
    3030import org.openstreetmap.josm.tools.ImageProvider;
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r12634 r12675  
    4242import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    4343import org.openstreetmap.josm.gui.MainApplication;
    44 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     44import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    4545import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    4646import org.openstreetmap.josm.tools.GBC;
  • trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java

    r12581 r12675  
    1616import org.openstreetmap.josm.data.DataSource;
    1717import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    18 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     18import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    1919import org.openstreetmap.josm.io.OnlineResource;
    2020import org.openstreetmap.josm.tools.Shortcut;
  • trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java

    r12636 r12675  
    1010import org.openstreetmap.josm.data.osm.NoteData;
    1111import org.openstreetmap.josm.gui.layer.NoteLayer;
    12 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     12import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    1313import org.openstreetmap.josm.tools.ImageProvider;
    1414import org.openstreetmap.josm.tools.Logging;
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r12670 r12675  
    9191import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
    9292import org.openstreetmap.josm.gui.preferences.server.ProxyPreference;
    93 import org.openstreetmap.josm.gui.progress.ProgressMonitorExecutor;
     93import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
    9494import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
    9595import org.openstreetmap.josm.gui.util.GuiHelper;
  • trunk/src/org/openstreetmap/josm/gui/MainPanel.java

    r12638 r12675  
    1414import org.openstreetmap.josm.gui.layer.MainLayerManager.LayerAvailabilityEvent;
    1515import org.openstreetmap.josm.gui.layer.MainLayerManager.LayerAvailabilityListener;
    16 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     16import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    1717import org.openstreetmap.josm.gui.util.GuiHelper;
    1818
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r12674 r12675  
    7171import org.openstreetmap.josm.data.preferences.DoubleProperty;
    7272import org.openstreetmap.josm.gui.help.Helpful;
    73 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    74 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.ProgressMonitorDialog;
     73import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
     74import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.ProgressMonitorDialog;
    7575import org.openstreetmap.josm.gui.util.GuiHelper;
    7676import org.openstreetmap.josm.gui.widgets.ImageLabel;
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r12285 r12675  
    2121
    2222import org.openstreetmap.josm.Main;
    23 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.ProgressMonitorDialog;
     23import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.ProgressMonitorDialog;
    2424import org.openstreetmap.josm.gui.util.GuiHelper;
    2525import org.openstreetmap.josm.gui.widgets.JosmTextArea;
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r11801 r12675  
    99import javax.swing.SwingUtilities;
    1010
    11 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    1211import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    1312import org.openstreetmap.josm.gui.progress.ProgressMonitor.CancelListener;
     13import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    1414import org.openstreetmap.josm.gui.progress.ProgressTaskId;
    1515import org.openstreetmap.josm.io.OsmTransferException;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r12663 r12675  
    3939import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    4040import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    41 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    4241import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     42import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    4343import org.openstreetmap.josm.io.OsmApi;
    4444import org.openstreetmap.josm.io.OsmApiException;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java

    r12663 r12675  
    2121import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    2222import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    23 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    2423import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     24import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2525import org.openstreetmap.josm.io.MultiFetchServerObjectReader;
    2626import org.openstreetmap.josm.io.OsmTransferException;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

    r12636 r12675  
    1818import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1919import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    20 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     20import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2121import org.openstreetmap.josm.io.OsmApi;
    2222import org.openstreetmap.josm.io.OsmServerBackreferenceReader;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java

    r12634 r12675  
    2626import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    2727import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    28 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     28import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2929import org.openstreetmap.josm.tools.ImageProvider;
    3030
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    r12672 r12675  
    2121import org.openstreetmap.josm.gui.MainApplication;
    2222import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    23 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    2423import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     24import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2525import org.openstreetmap.josm.io.OsmApi;
    2626import org.openstreetmap.josm.io.OsmServerObjectReader;
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractPrimitiveTask.java

    r12630 r12675  
    1818import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1919import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    20 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    2120import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     21import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    2222import org.openstreetmap.josm.gui.util.GuiHelper;
    2323import org.openstreetmap.josm.io.MultiFetchServerObjectReader;
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r12620 r12675  
    5050import org.openstreetmap.josm.gui.layer.Layer;
    5151import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    52 import org.openstreetmap.josm.gui.progress.SwingRenderingProgressMonitor;
     52import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor;
    5353import org.openstreetmap.josm.gui.util.GuiHelper;
    5454import org.openstreetmap.josm.tools.GBC;
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r12672 r12675  
    9999import org.openstreetmap.josm.gui.io.importexport.OsmImporter;
    100100import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    101 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    102101import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     102import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    103103import org.openstreetmap.josm.gui.util.GuiHelper;
    104104import org.openstreetmap.josm.gui.widgets.FileChooserManager;
  • trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java

    r12369 r12675  
    2727    private final CancelHandler cancelHandler;
    2828
    29     protected enum State {
     29    /**
     30     * Progress monitor state
     31     * @since 12675 (visibility)
     32     */
     33    public enum State {
     34        /** Initialization. Next valid states are {@link #IN_TASK} or {@link #FINISHED} */
    3035        INIT,
     36        /** In task. Next valid states are {@link #IN_SUBTASK} or {@link #FINISHED} */
    3137        IN_TASK,
     38        /** In subtask. Next valid states is {@link #IN_TASK} */
    3239        IN_SUBTASK,
     40        /** Finished. Can't change state after that */
    3341        FINISHED
    3442    }
  • trunk/src/org/openstreetmap/josm/gui/progress/ProgressRenderer.java

    r12369 r12675  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.progress;
     3
     4import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor;
    35
    46/**
  • trunk/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java

    r12674 r12675  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.progress;
     2package org.openstreetmap.josm.gui.progress.swing;
    33
    44import java.awt.Component;
     
    1616import org.openstreetmap.josm.gui.MapStatus.BackgroundProgressMonitor;
    1717import org.openstreetmap.josm.gui.PleaseWaitDialog;
     18import org.openstreetmap.josm.gui.progress.AbstractProgressMonitor;
     19import org.openstreetmap.josm.gui.progress.CancelHandler;
     20import org.openstreetmap.josm.gui.progress.ProgressException;
     21import org.openstreetmap.josm.gui.progress.ProgressTaskId;
    1822import org.openstreetmap.josm.gui.util.GuiHelper;
    1923import org.openstreetmap.josm.tools.bugreport.BugReport;
     
    2327 * <p>
    2428 * Progress is displayed in a dialog window ({@link PleaseWaitDialog}).
     29 * @since 12675 (moved from {@code gui.progress} package}
    2530 */
    2631public class PleaseWaitProgressMonitor extends AbstractProgressMonitor {
  • trunk/src/org/openstreetmap/josm/gui/progress/swing/ProgressMonitorExecutor.java

    r12674 r12675  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.progress;
     2package org.openstreetmap.josm.gui.progress.swing;
    33
    44import java.util.concurrent.LinkedBlockingQueue;
     
    1313 * Similar to Executors.newSingleThreadExecutor(), but displays the
    1414 * progress monitor whenever a new task is executed.
     15 * @since 12675 (moved from {@code gui.progress} package}
    1516 */
    1617public class ProgressMonitorExecutor extends ThreadPoolExecutor {
  • trunk/src/org/openstreetmap/josm/gui/progress/swing/SwingRenderingProgressMonitor.java

    r12674 r12675  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.progress;
     2package org.openstreetmap.josm.gui.progress.swing;
    33
    44import java.awt.Component;
    55
    66import org.openstreetmap.josm.Main;
     7import org.openstreetmap.josm.gui.progress.AbstractProgressMonitor;
     8import org.openstreetmap.josm.gui.progress.CancelHandler;
     9import org.openstreetmap.josm.gui.progress.ProgressRenderer;
     10import org.openstreetmap.josm.gui.progress.ProgressTaskId;
    711import org.openstreetmap.josm.gui.util.GuiHelper;
    812import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    1216 * of progress information to a {@link ProgressRenderer}.
    1317 * Methods of the progress renderer are always called on the Swing EDT.
    14  *
     18 * @since 12675 (moved from {@code gui.progress} package}
    1519 */
    1620public class SwingRenderingProgressMonitor extends AbstractProgressMonitor {
Note: See TracChangeset for help on using the changeset viewer.