Esempio n. 1
0
 // {{{ dragEnter() method
 @SuppressWarnings("deprecation")
 @Override
 public void dragEnter(DropTargetDragEvent dtde) {
   Log.log(Log.DEBUG, this, "Drag enter");
   savedBuffer = textArea.getBuffer();
   textArea.setDragInProgress(true);
   // textArea.getBuffer().beginCompoundEdit();
   savedCaret = textArea.getCaretPosition();
 } // }}}
Esempio n. 2
0
 // {{{ dragExit() method
 @SuppressWarnings("deprecation")
 @Override
 public void dragExit(DropTargetEvent dtde) {
   Log.log(Log.DEBUG, this, "Drag exit");
   textArea.setDragInProgress(false);
   // textArea.getBuffer().endCompoundEdit();
   if (textArea.getBuffer() == savedBuffer) {
     textArea.moveCaretPosition(savedCaret, TextArea.ELECTRIC_SCROLL);
   }
   savedBuffer = null;
 } // }}}