drag and drop - JavaFX - DnD - Third-Party Program to JavaFX App -
i have javafx app drag n drop email feature working fine if drag file windows explorer tab app.
however, if try drag email file outlook app, dragboard hasfiles method false, ondragdropped handler executed, tho.
im using transfermode.any , said, if drag email, or txt files using windows explorer work.
is there trick or limitation if u want drag app?
thanks
first, what's in dragboard:
dragboard db = event.getdragboard(); db.getcontenttypes().foreach(df -> system.out.println(df + " - " + db.getcontent(df)));
you output this:
[text/x-moz-url] - i
[application/x-moz-file-promise] - null
[text/x-moz-message] - i
[application/x-moz-file-promise-url] - java.nio.heapbytebuffer[pos=0 lim=200 cap=200]
[_netscape_url] - java.nio.heapbytebuffer[pos=0 lim=63 cap=63]
(in example dragged mail fossamail)
this tells mime-type (application/x-moz-file-promise-url) , class (heapbytebuffer):
dataformat df = dataformat.lookupmimetype("application/x-moz-file-promise-url"); bytebuffer buffer = (bytebuffer) db.getcontent(df);
Comments
Post a Comment