// {{{ 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(); } // }}}
// {{{ 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; } // }}}