forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDragHandler.java
More file actions
31 lines (28 loc) · 1.37 KB
/
DragHandler.java
File metadata and controls
31 lines (28 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package tests.detailed.handler;
import org.cef.browser.CefBrowser;
import org.cef.callback.CefDragData;
import org.cef.handler.CefDragHandler;
public class DragHandler implements CefDragHandler {
@Override
public boolean onDragEnter(CefBrowser browser, CefDragData dragData, int mask) {
System.out.println("DRAG:");
System.out.print(" flags:");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_COPY) != 0)
System.out.print(" COPY");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_LINK) != 0)
System.out.print(" LINK");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_GENERIC) != 0)
System.out.print(" GENERIC");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_PRIVATE) != 0)
System.out.print(" PRIVATE");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_MOVE) != 0)
System.out.print(" MOVE");
if ((mask & CefDragHandler.DragOperationMask.DRAG_OPERATION_DELETE) != 0)
System.out.print(" DELETE");
System.out.println("\n " + dragData);
return false;
}
}