Class DownloadAlongTrackAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.DownloadAlongAction
-
- org.openstreetmap.josm.gui.layer.gpx.DownloadAlongTrackAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Layer.LayerAction
,Layer.MultiLayerAction
,Destroyable
public class DownloadAlongTrackAction extends DownloadAlongAction implements Layer.LayerAction, Layer.MultiLayerAction
Action that issues a series of download requests to the API, following the GPX track.- Since:
- 5715
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<GpxData>
data
private static int
NEAR_BOTH
private static int
NEAR_TRACK
private static int
NEAR_WAYPOINTS
private static java.lang.String
PREF_DOWNLOAD_ALONG_TRACK_AREA
private static java.lang.String
PREF_DOWNLOAD_ALONG_TRACK_DISTANCE
private static java.lang.String
PREF_DOWNLOAD_ALONG_TRACK_GPS
private static java.lang.String
PREF_DOWNLOAD_ALONG_TRACK_NEAR
private static java.lang.String
PREF_DOWNLOAD_ALONG_TRACK_OSM
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description DownloadAlongTrackAction(java.util.Collection<GpxData> data)
Constructs a newDownloadAlongTrackAction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Component
createMenuComponent()
Creates and return the menu component.protected PleaseWaitRunnable
createTask()
Sub classes must override this method.javax.swing.Action
getMultiLayerAction(java.util.List<Layer> layers)
Returns the action for a given list of layers.boolean
supportLayers(java.util.List<Layer> layers)
Determines if this action supports a given list of layers.-
Methods inherited from class org.openstreetmap.josm.actions.DownloadAlongAction
actionPerformed, addToDownload, calcBetweenPoints, confirmAndDownloadAreas, createCalcTask
-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
NEAR_TRACK
private static final int NEAR_TRACK
- See Also:
- Constant Field Values
-
NEAR_WAYPOINTS
private static final int NEAR_WAYPOINTS
- See Also:
- Constant Field Values
-
NEAR_BOTH
private static final int NEAR_BOTH
- See Also:
- Constant Field Values
-
PREF_DOWNLOAD_ALONG_TRACK_OSM
private static final java.lang.String PREF_DOWNLOAD_ALONG_TRACK_OSM
- See Also:
- Constant Field Values
-
PREF_DOWNLOAD_ALONG_TRACK_GPS
private static final java.lang.String PREF_DOWNLOAD_ALONG_TRACK_GPS
- See Also:
- Constant Field Values
-
PREF_DOWNLOAD_ALONG_TRACK_DISTANCE
private static final java.lang.String PREF_DOWNLOAD_ALONG_TRACK_DISTANCE
- See Also:
- Constant Field Values
-
PREF_DOWNLOAD_ALONG_TRACK_AREA
private static final java.lang.String PREF_DOWNLOAD_ALONG_TRACK_AREA
- See Also:
- Constant Field Values
-
PREF_DOWNLOAD_ALONG_TRACK_NEAR
private static final java.lang.String PREF_DOWNLOAD_ALONG_TRACK_NEAR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DownloadAlongTrackAction
public DownloadAlongTrackAction(java.util.Collection<GpxData> data)
Constructs a newDownloadAlongTrackAction
- Parameters:
data
- The GPX data used to download along
-
-
Method Detail
-
createTask
protected PleaseWaitRunnable createTask()
Description copied from class:DownloadAlongAction
Sub classes must override this method.- Specified by:
createTask
in classDownloadAlongAction
- Returns:
- the task to start or null if nothing to do
-
createMenuComponent
public java.awt.Component createMenuComponent()
Description copied from interface:Layer.LayerAction
Creates and return the menu component.- Specified by:
createMenuComponent
in interfaceLayer.LayerAction
- Returns:
- the menu component
-
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
Description copied from interface:Layer.LayerAction
Determines if this action supports a given list of layers.- Specified by:
supportLayers
in interfaceLayer.LayerAction
- Parameters:
layers
- list of layers- Returns:
true
if this action supports the given list of layers,false
otherwise
-
getMultiLayerAction
public javax.swing.Action getMultiLayerAction(java.util.List<Layer> layers)
Description copied from interface:Layer.MultiLayerAction
Returns the action for a given list of layers.- Specified by:
getMultiLayerAction
in interfaceLayer.MultiLayerAction
- Parameters:
layers
- list of layers- Returns:
- the action for the given list of layers
-
-