Ejemplo n.º 1
0
 @Override
 public void dragOver(DropTargetDragEvent dtde) {
   if (dtde.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
     dtde.acceptDrag(DnDConstants.ACTION_COPY);
     return;
   }
   dtde.rejectDrag();
 }
 /** {@inheritDoc} */
 public void dragEnter(DropTargetDragEvent evt) {
   target = (JComponent) evt.getDropTargetContext().getComponent();
   TransferHandler th = target.getTransferHandler();
   canImport = th.canImport(target, evt.getCurrentDataFlavors());
   if (canImport) {
     saveComponentState(target);
     lastPosition = evt.getLocation();
   }
 }
 /** {@inheritDoc} */
 public void dragOver(DropTargetDragEvent evt) {
   if (canImport) {
     Point p = evt.getLocation();
     updateInsertionLocation(target, p);
     lastPosition = p;
   }
 }
Ejemplo n.º 4
0
 public void dragOver(DropTargetDragEvent e) {
   if (!((mxGraphTransferHandler) graphContainer.getTransferHandler()).isLocalDrag()
       && JTableRenderer.this != dragSource) {
     Point p = e.getLocation();
     int row = rowAtPoint(p);
     getSelectionModel().setSelectionInterval(row, row);
   }
 }