|
 |
|
Junior Member
Join Date: Mar 2002
Status:
Offline
|
|
Originally posted by RevEvs:
Does anyoen know if its possible to do the dock icon overlays (ala mail.app) with a java app? ive had a few quick looks at the apple java api's but have not been successful..
any help appreciated
Code:
NSImage nsImage = new NSImage();
NSBitmapImageRep rep = new NSBitmapImageRep(width, height, 8, 3, false, false,
NSGraphics.DeviceRGBColorSpace, 0, 0); // 8bpp, 3bytes/pixel, no alpha
rep.setBitmapData(bytes);
nsImage.addRepresentation(rep);
NSApplication.sharedApplication().setApplicationIconImage(nsImage);
Where bytes is a byte array describing the image. You'll need to load the image and perform the overlay in Java, then convert the Java representation of the image into the byte array in the format that the NSBitmapImageRep expects.
|
|
|
| |
|
|
|
 |