Package org.openstreetmap.josm.actions
Class MapRectifierWMSmenuAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.MapRectifierWMSmenuAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
public class MapRectifierWMSmenuAction extends JosmAction
Download rectified images from various services.- Since:
- 3715
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapRectifierWMSmenuAction.RectifierService
Class that bundles all required information of a rectifier service-
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.List<MapRectifierWMSmenuAction.RectifierService>
services
List of available rectifier services.-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description MapRectifierWMSmenuAction()
Constructs a newMapRectifierWMSmenuAction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
private static void
addWMSLayer(java.lang.String title, java.lang.String url)
Adds a WMS Layer with given title and URLprivate static void
handleException(java.lang.Exception e)
protected boolean
listenToSelectionChange()
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed.protected void
updateEnabledState()
Override in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e.-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
services
private final transient java.util.List<MapRectifierWMSmenuAction.RectifierService> services
List of available rectifier services.
-
-
Constructor Detail
-
MapRectifierWMSmenuAction
public MapRectifierWMSmenuAction()
Constructs a newMapRectifierWMSmenuAction
.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
addWMSLayer
private static void addWMSLayer(java.lang.String title, java.lang.String url)
Adds a WMS Layer with given title and URL- Parameters:
title
- Name of the layer as it will show up in the layer managerurl
- URL to the WMS server- Throws:
java.lang.IllegalStateException
- if imagery time is neither HTML nor WMS
-
handleException
private static void handleException(java.lang.Exception e)
-
listenToSelectionChange
protected boolean listenToSelectionChange()
Description copied from class:JosmAction
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed. Default is true.- Overrides:
listenToSelectionChange
in classJosmAction
- Returns:
true
if aDataSelectionListener
should be registered.
-
updateEnabledState
protected void updateEnabledState()
Description copied from class:JosmAction
Override in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e. when a layer is removed or added. SeeJosmAction.updateEnabledState(Collection)
to respond to changes in the collection of selected primitives. Default behavior is empty.- Overrides:
updateEnabledState
in classJosmAction
- See Also:
JosmAction.updateEnabledState(Collection)
,JosmAction.initEnabledState()
,JosmAction.listenToLayerChange()
-
-