Package org.openstreetmap.josm.actions
Class PasteAtSourcePositionAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.AbstractPasteAction
-
- org.openstreetmap.josm.actions.PasteAtSourcePositionAction
-
- All Implemented Interfaces:
java.awt.datatransfer.FlavorListener
,java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
public class PasteAtSourcePositionAction extends AbstractPasteAction
A special version of thePasteAction
that pastes at the exact source location the item was copied from.- Since:
- 10765
- 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 inherited from class org.openstreetmap.josm.actions.AbstractPasteAction
transferHandler
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description PasteAtSourcePositionAction()
Constructs a newPasteAtSourcePositionAction
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EastNorth
computePastePosition(java.awt.event.ActionEvent e)
Compute the location the objects should be pasted at.-
Methods inherited from class org.openstreetmap.josm.actions.AbstractPasteAction
actionPerformed, doPaste, flavorsChanged, updateEnabledState
-
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
-
-
-
-
Constructor Detail
-
PasteAtSourcePositionAction
public PasteAtSourcePositionAction()
Constructs a newPasteAtSourcePositionAction
.
-
-
Method Detail
-
computePastePosition
protected EastNorth computePastePosition(java.awt.event.ActionEvent e)
Description copied from class:AbstractPasteAction
Compute the location the objects should be pasted at.- Overrides:
computePastePosition
in classAbstractPasteAction
- Parameters:
e
- The action event that triggered the paste- Returns:
- The paste position.
-
-