/** * Forwards this event to the current listener if there is one. * * @param event the drop target event * @see DropTargetListener#dropAccept(DropTargetEvent) */ public void dropAccept(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop Accept: " + toString()); //$NON-NLS-1$ if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { public void run() throws Exception { getCurrentListener().dropAccept(event); } }); } }
/** * Forwards this event to the current listener if there is one. * * @param event the drop target event * @see DropTargetListener#dropAccept(DropTargetEvent) */ @Override public void dropAccept(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop Accept: " + toString()); //$NON-NLS-1$ if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { getCurrentListener().dropAccept(event); } }); } }
/** * Forwards this event to the current listener if there is one. * * @param event the drop target event * @see DropTargetListener#dropAccept(DropTargetEvent) */ @Override public void dropAccept(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop Accept: " + toString()); //$NON-NLS-1$ if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { getCurrentListener().dropAccept(event); } }); } }
/** * The cursor is moving over the drop target. Updates the current listener and * forwards this event to that listener. If no listener can handle the drag * operation the <code>event.detail</code> field is set to <code>DND.DROP_NONE</code> * to indicate an invalid drop. * * @param event the drop target event * @see DropTargetListener#dragOver(DropTargetEvent) */ @Override public void dragOver(final DropTargetEvent event) { TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // drag over. otherwise the new listener would get a dragEnter // followed by a dragOver with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { newListener.dragOver(event); } }); } }
/** * The cursor is moving over the drop target. Updates the current listener and * forwards this event to that listener. If no listener can handle the drag * operation the <code>event.detail</code> field is set to <code>DND.DROP_NONE</code> * to indicate an invalid drop. * * @param event the drop target event * @see DropTargetListener#dragOver(DropTargetEvent) */ @Override public void dragOver(final DropTargetEvent event) { TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // drag over. otherwise the new listener would get a dragEnter // followed by a dragOver with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { newListener.dragOver(event); } }); } }
/** * The operation being performed has changed (usually due to the user changing * a drag modifier key while dragging). Updates the current listener and forwards * this event to that listener. * * @param event the drop target event * @see DropTargetListener#dragOperationChanged(DropTargetEvent) */ public void dragOperationChanged(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drag Operation Changed to: " + event.detail); //$NON-NLS-1$ originalDropType = event.detail; TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // operation change. otherwise the new listener would get a dragEnter // followed by a dragOperationChanged with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { public void run() throws Exception { newListener.dragOperationChanged(event); } }); } }
/** * The cursor is moving over the drop target. Updates the current listener and * forwards this event to that listener. If no listener can handle the drag * operation the <code>event.detail</code> field is set to <code>DND.DROP_NONE</code> * to indicate an invalid drop. * * @param event the drop target event * @see DropTargetListener#dragOver(DropTargetEvent) */ public void dragOver(final DropTargetEvent event) { TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // drag over. otherwise the new listener would get a dragEnter // followed by a dragOver with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { public void run() throws Exception { newListener.dragOver(event); } }); } }
/** * The operation being performed has changed (usually due to the user changing * a drag modifier key while dragging). Updates the current listener and forwards * this event to that listener. * * @param event the drop target event * @see DropTargetListener#dragOperationChanged(DropTargetEvent) */ @Override public void dragOperationChanged(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drag Operation Changed to: " + event.detail); //$NON-NLS-1$ originalDropType = event.detail; TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // operation change. otherwise the new listener would get a dragEnter // followed by a dragOperationChanged with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { newListener.dragOperationChanged(event); } }); } }
/** * The operation being performed has changed (usually due to the user changing * a drag modifier key while dragging). Updates the current listener and forwards * this event to that listener. * * @param event the drop target event * @see DropTargetListener#dragOperationChanged(DropTargetEvent) */ @Override public void dragOperationChanged(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drag Operation Changed to: " + event.detail); //$NON-NLS-1$ originalDropType = event.detail; TransferDropTargetListener oldListener = getCurrentListener(); updateCurrentListener(event); final TransferDropTargetListener newListener = getCurrentListener(); // only notify the current listener if it hasn't changed based on the // operation change. otherwise the new listener would get a dragEnter // followed by a dragOperationChanged with the exact same event. if (newListener != null && newListener == oldListener) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { newListener.dragOperationChanged(event); } }); } }
/** * Forwards this event to the current listener, if there is one. Sets the * current listener to <code>null</code> afterwards. * * @param event the drop target event * @see DropTargetListener#drop(DropTargetEvent) */ public void drop(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop: " + toString()); //$NON-NLS-1$ updateCurrentListener(event); if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { public void run() throws Exception { getCurrentListener().drop(event); } }); } setCurrentListener(null, event); }
/** * Forwards this event to the current listener, if there is one. Sets the * current listener to <code>null</code> afterwards. * * @param event the drop target event * @see DropTargetListener#drop(DropTargetEvent) */ @Override public void drop(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop: " + toString()); //$NON-NLS-1$ updateCurrentListener(event); if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { getCurrentListener().drop(event); } }); } setCurrentListener(null, event); }
/** * Forwards this event to the current listener, if there is one. Sets the * current listener to <code>null</code> afterwards. * * @param event the drop target event * @see DropTargetListener#drop(DropTargetEvent) */ @Override public void drop(final DropTargetEvent event) { // if (Policy.DEBUG_DRAG_DROP) // System.out.println("Drop: " + toString()); //$NON-NLS-1$ updateCurrentListener(event); if (getCurrentListener() != null) { SafeRunnable.run(new SafeRunnable() { @Override public void run() throws Exception { getCurrentListener().drop(event); } }); } setCurrentListener(null, event); }