Java Code Examples for org.eclipse.swt.dnd.DND#FEEDBACK_EXPAND
The following examples show how to use
org.eclipse.swt.dnd.DND#FEEDBACK_EXPAND .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JdtViewerDropAdapter.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void setFeedback(DropTargetEvent event, int location) { if (feedbackEnabled) { switch (location) { case LOCATION_BEFORE: event.feedback = DND.FEEDBACK_INSERT_BEFORE; break; case LOCATION_AFTER: event.feedback = DND.FEEDBACK_INSERT_AFTER; break; case LOCATION_ON: default: event.feedback = DND.FEEDBACK_SELECT; break; } } // Explicitly inhibit SELECT feedback if desired if (!selectFeedbackEnabled) { event.feedback &= ~DND.FEEDBACK_SELECT; } if (expandEnabled) { event.feedback |= DND.FEEDBACK_EXPAND; } if (scrollEnabled) { event.feedback |= DND.FEEDBACK_SCROLL; } }
Example 2
Source File: PaletteToolTransferDropTargetListenerWithSelection.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override protected void handleDragOver() { updateTargetEditPart(); updateTargetRequest(); if (getCommand() != null && getCommand().canExecute()) { getCurrentEvent().detail = DND.DROP_COPY; } else { getCurrentEvent().detail = DND.DROP_NONE; } getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND; showTargetFeedback(); }