From: Egon W. <ego...@gm...> - 2008-02-01 16:20:07
|
On Feb 1, 2008 5:02 PM, <Mar...@ep...> wrote: > I couldnt find a format (searched all of latest svn cdk files) that had > mime types that matched "image/svg+xml" and "image/cml". The use of mimetypes ensures that copy/paste also works with other programs than just JCP... Still, 'image/cml' does not sound right :) > I found that if I replaced the above code with the following it got rid > of the exception: > > private DataFlavor molFlavor = new DataFlavor( > org.openscience.cdk.io.formats.MDLFormat.class, > "mdl mol file format"); > > private DataFlavor svgFlavor = new DataFlavor( > org.openscience.cdk.io.formats.SVGFormat.class, > "scalable vector graphics"); > > private DataFlavor cmlFlavor = new DataFlavor( > org.openscience.cdk.io.formats.CMLFormat.class, > "chemical markup language"); > > I hope I picked the right classes- let me know. MDLV2000Format is likely better... > MDLFormat has a > mimetype of "chemical/x-mdl-molfile"- but if I use this mimetype string > instead of org.openscience.cdk.io.formats.MDLFormat.class I still get > the exception. Your flavors might be added to solve the problem, but the first should really work... I don't have time, myself, to look into this... Egon -- ---- http://chem-bla-ics.blogspot.com/ |