use of java.awt.dnd.DragSourceDragEvent in project jdk8u_jdk by JetBrains.
the class SunDragSourceContextPeer method postDragSourceDragEvent.
protected final void postDragSourceDragEvent(final int targetAction, final int modifiers, final int x, final int y, final int dispatchType) {
final int dropAction = SunDragSourceContextPeer.convertModifiersToDropAction(modifiers, sourceActions);
DragSourceDragEvent event = new DragSourceDragEvent(getDragSourceContext(), dropAction, targetAction & sourceActions, modifiers, x, y);
EventDispatcher dispatcher = new EventDispatcher(dispatchType, event);
SunToolkit.invokeLaterOnAppContext(SunToolkit.targetToAppContext(getComponent()), dispatcher);
startSecondaryEventLoop();
}
use of java.awt.dnd.DragSourceDragEvent in project jna by java-native-access.
the class DragHandler method describe.
private void describe(String type, DragSourceEvent e) {
if (false) {
DragSourceContext ds = e.getDragSourceContext();
String msg = "drag: " + type;
if (e instanceof DragSourceDragEvent) {
DragSourceDragEvent ev = (DragSourceDragEvent) e;
msg += ": src=" + actionString(ds.getSourceActions()) + " usr=" + actionString(ev.getUserAction()) + " tgt=" + actionString(ev.getTargetActions()) + " act=" + actionString(ev.getDropAction()) + " mods=" + ev.getGestureModifiersEx();
} else {
msg += ": e=" + e;
}
if (!msg.equals(lastAction)) {
System.out.println(lastAction = msg);
}
}
}
Aggregations