Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua.osx
Class OSXApplication

java.lang.Object
  extended by ch.randelshofer.quaqua.osx.OSXApplication

public class OSXApplication
extends java.lang.Object

OSXApplication can get the native Mac OS X icon image of the application, and it can make the application icon bounce in the Dock.

The functionality is performed using the Cocoa class NSApplication.

Version:
$Id: OSXApplication.java 82 2009-06-11 08:57:33Z wrandelshofer $
Author:
Werner Randelshofer

Method Summary
static java.awt.image.BufferedImage getIconImage(int size)
          Returns the icon image of the application.
static void requestUserAttention(boolean requestCritical)
          Requests user attention through JNI or through Cocoa Java.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

requestUserAttention

public static void requestUserAttention(boolean requestCritical)
Requests user attention through JNI or through Cocoa Java. This method will fail silently if neither JNI nor Cocoa Java is available.

Parameters:
requestCritical - Set this to true, if your application invokes a modal dialog. Set this to false, in all other cases.

getIconImage

public static java.awt.image.BufferedImage getIconImage(int size)
Returns the icon image of the application.

Parameters:
size - the desired size of the icon in pixels (width and height)
Returns:
The application image. Returns a generic application image if JNI is not available.

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.