[Biojava-l] copying Distribution logos
Thomas Down
td2@sanger.ac.uk
Wed, 25 Jul 2001 09:40:14 +0100
On Wed, Jul 25, 2001 at 02:12:37PM +1200, Schreiber, Mark wrote:
> Hi -
>
> I am making a gui that displays the DistributionLogo. What I want to know is
> if there is a way to get the logo (once displayed)
> to the clipboard.
As you probably know, Java does have some abstractions to the
clipboard APIs of whatever platform it's running on, in the
package java.awt.datatransfer. However, the impression I've
always got is that these APIs aren't well-defined for any case
other than transfering plain text -- certain not in a cross-platform
manner. Sun are still working on these APIs, so possibly things
are improving now: I haven't tried them for a while.
If you can't get anywhere, a possible alternative might be
to just add a `Save as PNG' option (or whatever). This is
quite easy: draw into a BufferedImage then run that though
an off-the-shelf encoder (or the built in image I/O in JDK1.4).
Thomas.