src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java
Print this page
rev 9830 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by: darcy, prr
*** 27,36 ****
--- 27,37 ----
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Window;
+ import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.InvalidDnDOperationException;
*** 108,118 ****
theInstance.setTrigger(dge);
return theInstance;
}
protected void startDrag(Transferable transferable,
! long[] formats, Map formatMap) {
Component component = getTrigger().getComponent();
Component c = null;
XWindowPeer wpeer = null;
for (c = component; c != null && !(c instanceof Window);
--- 109,119 ----
theInstance.setTrigger(dge);
return theInstance;
}
protected void startDrag(Transferable transferable,
! long[] formats, Map<Long, DataFlavor> formatMap) {
Component component = getTrigger().getComponent();
Component c = null;
XWindowPeer wpeer = null;
for (c = component; c != null && !(c instanceof Window);
*** 159,171 ****
timeStamp = XToolkit.getCurrentServerTime();
int dropActions = getDragSourceContext().getSourceActions();
! Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = (XDragSourceProtocol)dragProtocols.next();
try {
dragProtocol.initializeDrag(dropActions, transferable,
formatMap, formats);
} catch (XException xe) {
throw (InvalidDnDOperationException)
--- 160,173 ----
timeStamp = XToolkit.getCurrentServerTime();
int dropActions = getDragSourceContext().getSourceActions();
! Iterator<XDragSourceProtocol> dragProtocols =
! XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = dragProtocols.next();
try {
dragProtocol.initializeDrag(dropActions, transferable,
formatMap, formats);
} catch (XException xe) {
throw (InvalidDnDOperationException)
*** 311,323 ****
}
dragDropFinished(false, DnDConstants.ACTION_NONE, xRoot, yRoot);
}
! Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = (XDragSourceProtocol)dragProtocols.next();
try {
dragProtocol.cleanup();
} catch (XException xe) {
// Ignore the exception.
}
--- 313,326 ----
}
dragDropFinished(false, DnDConstants.ACTION_NONE, xRoot, yRoot);
}
! Iterator<XDragSourceProtocol> dragProtocols =
! XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = dragProtocols.next();
try {
dragProtocol.cleanup();
} catch (XException xe) {
// Ignore the exception.
}
*** 416,428 ****
if (subwindow != 0) {
clientWindow = findClientWindow(subwindow);
}
if (clientWindow != 0) {
! Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = (XDragSourceProtocol)dragProtocols.next();
if (dragProtocol.attachTargetWindow(clientWindow, time)) {
protocol = dragProtocol;
break;
}
}
--- 419,432 ----
if (subwindow != 0) {
clientWindow = findClientWindow(subwindow);
}
if (clientWindow != 0) {
! Iterator<XDragSourceProtocol> dragProtocols =
! XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = dragProtocols.next();
if (dragProtocol.attachTargetWindow(clientWindow, time)) {
protocol = dragProtocol;
break;
}
}
*** 548,561 ****
" ev=" + ev);
}
XClientMessageEvent xclient = ev.get_xclient();
! Iterator dragProtocols = XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol =
! (XDragSourceProtocol)dragProtocols.next();
if (dragProtocol.processProxyModeEvent(xclient,
getProxyModeSourceWindow())) {
return true;
}
}
--- 552,565 ----
" ev=" + ev);
}
XClientMessageEvent xclient = ev.get_xclient();
! Iterator<XDragSourceProtocol> dragProtocols =
! XDragAndDropProtocols.getDragSourceProtocols();
while (dragProtocols.hasNext()) {
! XDragSourceProtocol dragProtocol = dragProtocols.next();
if (dragProtocol.processProxyModeEvent(xclient,
getProxyModeSourceWindow())) {
return true;
}
}