Hi Kristian--
You can probably make this work the way you want using session callbacks to handle the drag/drop operation. Look in the Help Center for "session_add_callback" for info on the callbacks used to handle drag/drop. Then, you just need to make sure that the Java app puts the right thing on the clipboard for the drag operation (most likely a file path to the graphic source).
Here's some simple drop handler code from an old presentation I gave. It's not explicitly for handling graphics, but it shouldn't be hard to adapt to your use case.
--Clay
# ACL drop handler code
function drop_handler(path,num,count,flags) {
local $ext = tolower(substr($path,length($path)-3));
if ($ext == "xml") {
if ($flags & 0x0001) { # SHIFT-drag
# insert content inline
execute("read " . $path);
}
else if ($flags & 0x0002) { # CTRL-drag
# insert Xinclude reference
$xi = "<xi:include href=" . $path . "/>";
insert($xi);
}
else {
execute("edit -newwindow " . path);
}
}
}
session_add_callback("drop_file",drop_handler);