public abstract class DownloadAlongAction extends JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
sc
Constructor and Description |
---|
DownloadAlongAction(java.lang.String name,
java.lang.String iconName,
java.lang.String tooltip,
Shortcut shortcut,
boolean registerInToolbar)
Constructs a new
DownloadAlongAction |
Modifier and Type | Method and Description |
---|---|
protected static void |
addToDownload(java.awt.geom.Area a,
java.awt.geom.Rectangle2D r,
java.util.Collection<java.awt.geom.Rectangle2D> results,
double maxArea) |
protected static void |
confirmAndDownloadAreas(java.awt.geom.Area a,
double maxArea,
boolean osmDownload,
boolean gpxDownload,
java.lang.String title,
ProgressMonitor progressMonitor)
Area "a" contains the hull that we would like to download data for.
|
destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, waitFuture
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public DownloadAlongAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean registerInToolbar)
DownloadAlongAction
name
- the action's text as displayed in the menuiconName
- the filename of the icon to usetooltip
- a longer description of the action that will be displayed in the tooltip. Please note
that html is not supported for menu actions on some platforms.shortcut
- a ready-created shortcut object or null if you don't want a shortcut. But you always
do want a shortcut, remember you can always register it with group=none, so you
won't be assigned a shortcut unless the user configures one. If you pass null here,
the user CANNOT configure a shortcut for your action.registerInToolbar
- register this action for the toolbar preferences?protected static void addToDownload(java.awt.geom.Area a, java.awt.geom.Rectangle2D r, java.util.Collection<java.awt.geom.Rectangle2D> results, double maxArea)
protected static void confirmAndDownloadAreas(java.awt.geom.Area a, double maxArea, boolean osmDownload, boolean gpxDownload, java.lang.String title, ProgressMonitor progressMonitor)
a
- download area hullmaxArea
- maximum area size for a single downloadosmDownload
- Set to true if OSM data should be downloadedgpxDownload
- Set to true if GPX data should be downloadedtitle
- the title string for the confirmation dialogprogressMonitor
- the progress monitor