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>dataprivate static intNEAR_BOTHprivate static intNEAR_TRACKprivate static intNEAR_WAYPOINTSprivate static java.lang.StringPREF_DOWNLOAD_ALONG_TRACK_AREAprivate static java.lang.StringPREF_DOWNLOAD_ALONG_TRACK_DISTANCEprivate static java.lang.StringPREF_DOWNLOAD_ALONG_TRACK_GPSprivate static java.lang.StringPREF_DOWNLOAD_ALONG_TRACK_NEARprivate static java.lang.StringPREF_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.ComponentcreateMenuComponent()Creates and return the menu component.protected PleaseWaitRunnablecreateTask()Sub classes must override this method.javax.swing.ActiongetMultiLayerAction(java.util.List<Layer> layers)Returns the action for a given list of layers.booleansupportLayers(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:DownloadAlongActionSub classes must override this method.- Specified by:
createTaskin classDownloadAlongAction- Returns:
- the task to start or null if nothing to do
-
createMenuComponent
public java.awt.Component createMenuComponent()
Description copied from interface:Layer.LayerActionCreates and return the menu component.- Specified by:
createMenuComponentin interfaceLayer.LayerAction- Returns:
- the menu component
-
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
Description copied from interface:Layer.LayerActionDetermines if this action supports a given list of layers.- Specified by:
supportLayersin interfaceLayer.LayerAction- Parameters:
layers- list of layers- Returns:
trueif this action supports the given list of layers,falseotherwise
-
getMultiLayerAction
public javax.swing.Action getMultiLayerAction(java.util.List<Layer> layers)
Description copied from interface:Layer.MultiLayerActionReturns the action for a given list of layers.- Specified by:
getMultiLayerActionin interfaceLayer.MultiLayerAction- Parameters:
layers- list of layers- Returns:
- the action for the given list of layers
-
-