Clipboard Formats

mikhail cherkasov mikhail.cherkasov at oracle.com
Thu Jan 17 09:17:55 PST 2013


Looks like MacRomam is still here but has new form:
http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/b89ba9a6d9a6

But I sill intresting jdk6s DataTransferer.standardEncodings()code.

17.01.2013 20:29, mikhail cherkasov пишет:
> Hello All,
>
> I found why the flavor list is different, as I see 
> DataTransferer.standardEncodings() produce different results for jdk6 
> and jdk7.
> Furthermore, all Mac* charsets and support classes( converters) were 
> exclude form jdk7, however they present in jdk6.
>
> So have you any idea why this was done? is it possible to get them back?
>
> Also where can I get DataTransferer.standardEncodings() method sources?
> Because I still don't know why DataTransferer.standardEncodings() 
> result depends on how it was launched.
>
> Thanks,
> Mikhail.
>
> 23.12.2012 1:42, Mikhail Cherkasov пишет:
>> Sounds like I don't have to dig native code, it's good news, thanks 
>> for help.
>>
>> 23.12.2012 1:29, Mike Swingler пишет:
>>> On Dec 22, 2012, at 3:00 PM, Mikhail Cherkasov 
>>> <mikhail.cherkasov at oracle.com> wrote:
>>>
>>>> Hello All,
>>>>
>>>> Jdk 7 has less data flavor types than jdk 6, the following types 
>>>> are missing from in jdk 7:
>>>> -text/plain; class=java.io.InputStream; charset=MacRoman
>>>> -text/plain; class=java.nio.ByteBuffer; charset=MacRoman
>>>> -text/plain; class="[B"; charset=MacRoman
>>>>
>>>> You can print available formats by this code:
>>>> for (final DataFlavor flavor : 
>>>> Toolkit.getDefaultToolkit().getSystemClipboard().getAvailableDataFlavors()) 
>>>> {
>>>>             System.out.println(flavor.getMimeType());
>>>> }
>>>>
>>>> Does anyone know why this DataFlavors are absent in jdk 7?
>>>> And is it possible to get them back? if yes, how I can do this?
>>>>
>>>> I have not idea where to get jdk6 source code for macos, so I can't 
>>>> compare
>>>> Java_sun_lwawt_macosx_CClipboard_getClipboardFormats method 
>>>> implementation.
>>> Java_sun_lwawt_macosx_CClipboard_getClipboardFormats() and 
>>> Java_apple_awt_CClipboard_getClipboardFormats() in Java SE 6 are 
>>> line-for-line copies of each other. Also, CClipboard.m in OpenJDK 8 
>>> is largely identical to the original version created in 2002 by 
>>> Scott Kovatch. :-)
>>>
>>> I have noticed that the flavormap.properties file is significantly 
>>> different. Perhaps that would be a fruitful area of investigation.
>>>
>>> Regards,
>>> Mike Swingler
>>> Apple Inc.
>>>
>>
>



More information about the macosx-port-dev mailing list