We are looking for ways to copy (copyToClipboard) in JBO and paste it into word document.
we were using the copyToClipboard API - and it did not work (nothing on the clipboard)
Can someone send an example how to do it right?
I believe one way of doing this is to override JGoView.copyToClipboard to set the Clipboard contents to a Transferable that handles the DataFlavor.imageFlavor data format. You’ll need to define a method on JGoView that produces a BufferedImage, in the same manner that other methods in JGoView do, or that the JPEGView example class does.
For the Transferable class, you could subclass JGoDocument to override the Transferable methods to additionally handle the DataFlavor.imageFlavor case. Or you could define your own class to implement Transferable, most conveniently your JGoView subclass itself.
I haven’t been able to find any code lying around that does this. But I know some customers have done this before.
There haven’t been any changes to the supported data flavors since the earlier post. The default behavior allows cut and paste between different JGo instances, but does not place any image data flavors on the clipboard. The advice above should still work though.