Class MilSymbolTransferable

java.lang.Object
edu.cnu.mdi.mapping.milsym.MilSymbolTransferable
All Implemented Interfaces:
Transferable

public final class MilSymbolTransferable extends Object implements Transferable
Drag-and-drop payload that carries a MilSymbolDescriptor from the NatoIconPicker palette to the map canvas.

Usage


 // In NatoIconPicker — start the drag:
 Transferable t = new MilSymbolTransferable(descriptor);
 dragSource.startDrag(dge, customCursor, t, dragListener);

 // In MapContainer's DropTarget — receive it:
 if (event.isDataFlavorSupported(MilSymbolTransferable.FLAVOR)) {
     MilSymbolDescriptor d =
         (MilSymbolDescriptor) event.getTransferable()
                                    .getTransferData(MilSymbolTransferable.FLAVOR);
 }