equal
deleted
inserted
replaced
925 public FontPeer getFontPeer(String name, int style){ |
925 public FontPeer getFontPeer(String name, int style){ |
926 return new XFontPeer(name, style); |
926 return new XFontPeer(name, style); |
927 } |
927 } |
928 |
928 |
929 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException { |
929 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException { |
|
930 final LightweightFrame f = SunToolkit.getLightweightFrame(dge.getComponent()); |
|
931 if (f != null) { |
|
932 return f.createDragSourceContextPeer(dge); |
|
933 } |
|
934 |
930 return XDragSourceContextPeer.createDragSourceContextPeer(dge); |
935 return XDragSourceContextPeer.createDragSourceContextPeer(dge); |
931 } |
936 } |
932 |
937 |
933 @SuppressWarnings("unchecked") |
938 @SuppressWarnings("unchecked") |
934 public <T extends DragGestureRecognizer> T |
939 public <T extends DragGestureRecognizer> T |
936 DragSource ds, |
941 DragSource ds, |
937 Component c, |
942 Component c, |
938 int srcActions, |
943 int srcActions, |
939 DragGestureListener dgl) |
944 DragGestureListener dgl) |
940 { |
945 { |
|
946 final LightweightFrame f = SunToolkit.getLightweightFrame(c); |
|
947 if (f != null) { |
|
948 return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl); |
|
949 } |
|
950 |
941 if (MouseDragGestureRecognizer.class.equals(recognizerClass)) |
951 if (MouseDragGestureRecognizer.class.equals(recognizerClass)) |
942 return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl); |
952 return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl); |
943 else |
953 else |
944 return null; |
954 return null; |
945 } |
955 } |