Class OsmTransferHandler

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.TransferHandler

        javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Collection<AbstractOsmDataPaster> SUPPORTED  
      • Fields inherited from class javax.swing.TransferHandler

        COPY, COPY_OR_MOVE, LINK, MOVE, NONE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Collection<AbstractOsmDataPaster> getSupportedPasters()  
      private boolean importTags​(javax.swing.TransferHandler.TransferSupport support, java.util.Collection<? extends OsmPrimitive> primitives)  
      boolean isDataAvailable()
      Check if any primitive data or any other supported data is available in the clipboard.
      void pasteOn​(OsmDataLayer editLayer, EastNorth mPosition)
      Paste the current clipboard current at the given position
      void pasteOn​(OsmDataLayer editLayer, EastNorth mPosition, java.awt.datatransfer.Transferable transferable)
      Paste the given clipboard current at the given position
      void pasteTags​(java.util.Collection<? extends OsmPrimitive> primitives)
      Paste the given tags on the primitives.
      • Methods inherited from class javax.swing.TransferHandler

        canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getDragImage, getDragImageOffset, getPasteAction, getVisualRepresentation, importData, setDragImage, setDragImageOffset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • importTags

        private boolean importTags​(javax.swing.TransferHandler.TransferSupport support,
                                   java.util.Collection<? extends OsmPrimitive> primitives)
      • pasteOn

        public void pasteOn​(OsmDataLayer editLayer,
                            EastNorth mPosition)
        Paste the current clipboard current at the given position
        Parameters:
        editLayer - The layer to paste on.
        mPosition - The position to paste at. If it is null, the original position will be used.
      • pasteOn

        public void pasteOn​(OsmDataLayer editLayer,
                            EastNorth mPosition,
                            java.awt.datatransfer.Transferable transferable)
        Paste the given clipboard current at the given position
        Parameters:
        editLayer - The layer to paste on.
        mPosition - The position to paste at. If it is null, the original position will be used.
        transferable - The transferable to use.
      • pasteTags

        public void pasteTags​(java.util.Collection<? extends OsmPrimitive> primitives)
        Paste the given tags on the primitives.
        Parameters:
        primitives - The primitives to paste on.
      • isDataAvailable

        public boolean isDataAvailable()
        Check if any primitive data or any other supported data is available in the clipboard.
        Returns:
        true if any flavor is supported.