The Source for Java Technology Collaboration

Home » java.net Forums » Java Desktop Technologies » JDIC

Thread: [Mac OS X] Drawing directly to NSView

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0 Threads: [ Previous | Next ]
derdoc80

Posts: 1
[Mac OS X] Drawing directly to NSView
Posted: Apr 9, 2008 11:04 PM
 
  Click to reply to this thread Reply

Hello Folks,

after reading the source of the native .jnilib of JDIC for mac os x, I asked myself why it shouldnt be possible to draw directly into an NSView from Java since it seems to me that the "painters model" is the same.
Just have a proxy class in java as subclass of Component or whatever, proxy code inside a jnilib that passes all calls to a native subclass of NSView.
Shouldnt that be fairly easy?
Before you ask yourself if that isnt re-circumventing the wheel, since the whole point of having Java is to not have to deal with NSViews directly anymore: you are right.
But looking at the TrayIcon class in JDCI and in Java 6, I concluded that you still can only set an icon into the tray. What if you want to be able to draw into it from Java? As a side note: in Cocao you can draw onto your DockTile, too - that is not in Java 6.

Just some ideas from me...




 XML java.net RSS