Skip to content

Commit 0ae4ad2

Browse files
committed
DnD, FileSystem, JSUtil additions
1 parent a6045ee commit 0ae4ad2

File tree

14 files changed

+1676
-1622
lines changed

14 files changed

+1676
-1622
lines changed
115 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200412183843
1+
20200412235637
115 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200412183843
1+
20200412235637
115 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/awt/Component.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
import sun.awt.CausedFocusEvent;
7676
import sun.awt.RequestFocusController;
7777
import sun.awt.SunToolkit;
78+
import sun.awt.dnd.SunDropTargetEvent;
7879
import swingjs.JSToolkit;
7980

8081
/**
@@ -3803,10 +3804,10 @@ protected void dispatchEventImplComp(AWTEvent e) {
38033804
* notify AWTEventListeners.
38043805
*/
38053806

3806-
// if (e instanceof SunDropTargetEvent) {
3807-
// ((SunDropTargetEvent)e).dispatch();
3808-
// return;
3809-
// }
3807+
if (e instanceof SunDropTargetEvent) {
3808+
((SunDropTargetEvent)e).dispatch();
3809+
return;
3810+
}
38103811

38113812
if (!e.focusManagerIsDispatching) {
38123813
// Invoke the private focus retargeting method which provides

sources/net.sf.j2s.java.core/src/java/io/File.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public URI toURI() {
708708
try {
709709
String sp = slashify(getAbsoluteFile().getPath(), false);
710710
if (sp.startsWith("//"))
711-
sp = "//" + sp;
711+
sp = "file:" + sp;
712712
URI uri = new URI("file", null, sp, null);
713713
uri.秘bytes = 秘bytes;
714714
return uri;

sources/net.sf.j2s.java.core/src/java/io/FileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private static byte[] _getTempFileBytes(File file) {
130130

131131
boolean _isDir(File file) {
132132
// only an approximation. avoiding xxxx: here completely
133-
return (_isValid(file) && (file.getPrefixLength() == file.path.length() || !_exists(file)));
133+
return (file.秘bytes == null && _isValid(file) && (file.getPrefixLength() == file.path.length() || !_exists(file)));
134134
}
135135

136136
/**

0 commit comments

Comments
 (0)