Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: painting in Java to a (native) NSView possible?




On Sep 27, 2006, at 4:44 AM, Rob Ross wrote:

Hi.

Is there a way to provide some kind of wrapper/bridge object in Java (via JNI) to a native NSView class so that I can make Java2D drawing calls to something like an "NSViewJComponent" from Java, treating it like a JComponent from within Java?

What I'm really trying to do is implement an NSStatusItem with a custom NSView, so I can draw, from within Java, an animated GIF, and provide a custom JPopupMenu. (I know how to do this as a pure Cocoa app, but I can't reliably pass the image that exists in Java as an Icon to Cocoa via JNI ((long story, different topic)). So If I can do the drawing in Java, that solves *that* particular problem.)

I looked at CocoaComponent, but that's for letting Cocoa draw into a component hosted in a Java view, so it's the opposite of what I need.

I haven't seen anything that makes me too hopeful that this is possible, but you never know until you ask. :)

An interesting idea. I would still also be interested in more examples of CocoaComponent's use, also more examples of what is up with Quicktime for Java these days. maybe some mention of what is being done with OS X and jogl with examples.



Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >painting in Java to a (native) NSView possible? (From: Rob Ross <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.