Class PrimitiveTagTransferPaster
- java.lang.Object
-
- org.openstreetmap.josm.gui.datatransfer.importers.AbstractOsmDataPaster
-
- org.openstreetmap.josm.gui.datatransfer.importers.AbstractTagPaster
-
- org.openstreetmap.josm.gui.datatransfer.importers.PrimitiveTagTransferPaster
-
public class PrimitiveTagTransferPaster extends AbstractTagPaster
This class helps pasting tags from other primitives. It handles resolving conflicts.- Since:
- 10737
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PrimitiveTagTransferPaster.TagPasteSupport
-
Field Summary
-
Fields inherited from class org.openstreetmap.josm.gui.datatransfer.importers.AbstractOsmDataPaster
df
-
-
Constructor Summary
Constructors Constructor Description PrimitiveTagTransferPaster()
Create a newPrimitiveTagTransferPaster
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>
getTags(TransferHandler.TransferSupport support)
Gets the tags that should be pasted.boolean
importTagsOn(TransferHandler.TransferSupport support, Collection<? extends OsmPrimitive> selection)
Imports only if this import changes the tags only.-
Methods inherited from class org.openstreetmap.josm.gui.datatransfer.importers.AbstractTagPaster
commitCommands, importData
-
Methods inherited from class org.openstreetmap.josm.gui.datatransfer.importers.AbstractOsmDataPaster
supports, supports
-
-
-
-
Constructor Detail
-
PrimitiveTagTransferPaster
public PrimitiveTagTransferPaster()
Create a newPrimitiveTagTransferPaster
-
-
Method Detail
-
importTagsOn
public boolean importTagsOn(TransferHandler.TransferSupport support, Collection<? extends OsmPrimitive> selection) throws UnsupportedFlavorException, IOException
Description copied from class:AbstractOsmDataPaster
Imports only if this import changes the tags only. Does nothing if more than tags would be changed.- Overrides:
importTagsOn
in classAbstractTagPaster
- Parameters:
support
- The supportselection
- The primitives to apply on.- Returns:
true
if an import was done.- Throws:
UnsupportedFlavorException
- if the requested data flavor is not supportedIOException
- if an I/O error occurs
-
getTags
protected Map<String,String> getTags(TransferHandler.TransferSupport support) throws UnsupportedFlavorException, IOException
Description copied from class:AbstractTagPaster
Gets the tags that should be pasted.- Specified by:
getTags
in classAbstractTagPaster
- Parameters:
support
- The TransferSupport to get the tags from.- Returns:
- The tags
- Throws:
UnsupportedFlavorException
- if the requested data flavor is not supportedIOException
- if an I/O error occurs
-
-