Package org.openstreetmap.josm.actions
Class JumpToAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.JumpToAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
public class JumpToAction extends JosmAction
Allows to jump to a specific location.- Since:
- 2575
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JumpToAction.JumpToPositionDialog
(package private) class
JumpToAction.OsmLonLatListener
(package private) class
JumpToAction.OsmURLListener
-
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 JosmTextField
lat
private JosmTextField
lon
private JosmTextField
place
private JosmTextField
url
private JosmTextField
zm
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description JumpToAction()
Constructs a newJumpToAction
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
private void
parseURL()
private void
setBounds(Bounds b)
void
showJumpToDialog()
Displays the "Jump to" dialog.protected void
updateEnabledState()
Override in subclasses to update the enabled state of the action when something in the JOSM state changes, i.e.private void
updateUrl(boolean force)
-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, 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
-
url
private final JosmTextField url
-
place
private final JosmTextField place
-
lat
private final JosmTextField lat
-
lon
private final JosmTextField lon
-
zm
private final JosmTextField zm
-
-
Constructor Detail
-
JumpToAction
public JumpToAction()
Constructs a newJumpToAction
.
-
-
Method Detail
-
showJumpToDialog
public void showJumpToDialog()
Displays the "Jump to" dialog.
-
parseURL
private void parseURL()
-
updateUrl
private void updateUrl(boolean force)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
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()
-
-